The effect of optical radiation in the visible and near-infrared bands on resistive switching of a MOS stack based on ZrO2(Y) film on an n-Si(001) substrate with self-assembled Ge nanoislands on its surface has been studied. An increase in the resistive switching logical gap was observed upon the photoexcitation, in particular, when the photon energies were smaller than the Si band gap. The effect was associated with the impact of the photovoltage at the Si/Ge/ZrO2(Y) interface. In the latter case, the effect is associated with spatially indirect interband optical transitions in Ge nanoislands.