Optimization of multilayer integrated optics waveguides