We propose a new class of resonant silicon optical devices, consisting of a ring resonator coupled to a Mach-Zehnder interferometer, which is passively temperature compensated by tailoring the optical mode confinement in the waveguides. We demonstrate operation of the device over a wide temperature range of 80 degrees. The fundamental principle behind this work can be extended to other photonic devices based on resonators such as modulators, routers, switches and filters.