The structure of the giant dipole resonance: (I). Proton capture by light nuclei