Localized stimulation of the inner retinal neurons for high-acuity prosthetic vision requires small pixels and minimal crosstalk from the neighboring electrodes. Local return electrodes within each pixel limit the crosstalk, but they over-constrain the electric field, thus precluding the efficient stimulation with subretinal pixels smaller than 55 μm. Here we demonstrate a high-resolution prosthetic vision based on a novel design of a photovoltaic array, where field confinement is achieved dynamically, leveraging the adjustable conductivity of the diodes under forward bias to turn the designated pixels into transient returns. We validated the computational modeling of the field confinement in such an optically-controlled circuit by in-vitro and in-vivo measurements. Most importantly, using this strategy, we demonstrated that the grating acuity with 40 μm pixels matches the pixel pitch, while with 20 μm pixels, it reaches the 28 μm limit of the natural visual resolution in rats. This method enables customized field shaping based on individual retinal thickness and distance from the implant, paving the way to higher acuity of prosthetic vision in atrophic macular degeneration.