Integrated waveguides and nanowires for optical spectral shaping by using Sagnac loop reflectors