Production of real photons at large transverse momentum in QCD