Multi-stage switching networks for waveguide optical technology