We show that the matrix element of a local quark-gluon operator in the photon state, <gamma(klambda)/O/gamma(klambda)>, can be calculated in lattice QCD. The result is generalized to other quantities involving spacelike photons, including the transition form factor gammagamma*-->pi(0) and the virtual-photon-nucleon Compton amplitude <gamma*N /gamma*N> which can be used to define the generalized Drell-Hearn-Gerasimov and Bjorken sum rules.