Optical device fabrication