A novel approach to design NxN silica-on-silicon optical switches based on phase-compensated and cascaded multimode interference structures is presented. Taking into consideration of weakly guiding features of silica-on-silicon waveguides, instead of using self-imaging theory, we apply a two-step design approach: In the first step the multimode sections are optimized for minimum loss and best uniformity. In the second step the phase shifting compensations are obtained by accurate calculation of relative phases of MMI sections. Using this novel approach we design a 4x4 optical switch and achieved better device performance from our numerical stimulation results. Compared with the configuration from the self-imaging theory, the results from our design approach can reduce the device loss and crosstalk by 1dB and 8dB, respectively.