Proton and alpha-particle capture reactions at sub-Coulomb energies relevant to the p process