General theory for the interference of two-photon and one-photon processes in semiconductor heterostructures