Forward produced hadrons in μp and μd scattering and investigation of the charge structure of the nucleon