The present invention is a method of fabricating a waveguide using a sacrificial spacer layer. The first step in this process is to fabricate the underlying optical semiconductor structure. A trench is then etched in this structure and a sacrificial spacer layer is deposited in the trench. The waveguide is then created in the trench on the sacrificial spacer layer. User-defined portions of the sacrificial spacer layer are subsequently removed to create air gaps between the waveguide and the sidewalls of the trench in the optical semiconductor.