Measurement of gamma-ray production cross sections for nuclear reactions 14N(d,pγ)15N and 28Si(d,pγ)29Si