The electrical conductivity of the two-dimensional (2D) electron gas at the interface of epitaxially grown ultrathin films of LaTiO3 on SrTiO3 shows a large gain upon near-UV excitation. The gain in conductivity can be turned on or off by the application of a gate voltage of correct polarity. This feature of the 2D gas should allow realization of optoelectronic devices whose functionality can be enhanced by sequential application of an electric field and light. © 2010 WILEY-VCH Verlag GmbH & Co. KGaA, Weinheim.