A near-field scanning optical microscope is used to locally induce photocurrent in a graphene transistor with high spatial resolution. By analyzing the spatially resolved photo-response, we find that in the n-type conduction regime a p-n-p structure forms along the graphene device due to the doping of the graphene by the metal contacts. The modification of the electronic structure is not limited only underneath the metal electrodes, but extends 0.2-0.3 um into the graphene channel. The asymmetric conduction behavior of electrons and holes that is commonly observed in graphene transistors is discussed in light of the potential profiles obtained from this photocurrent imaging approach. Furthermore, we show that photocurrent imaging can be used to probe single- / multi-layer graphene interfaces.