A recently introduced optimal control theory method for optical waveguide design is applied to Y-branch waveguides and Mach-Zehnder modulators. The method simultaneously optimizes many parameters in a chosen design scheme; computational effort scales mildly with the number of parameters considered. Significant improvement in guiding efficiency relative to intuitively reasonable initial parameter choices is obtained in all cases.