Optimization of waveguide enhanced Raman spectroscopy systems