Design and fabrication of nanoimprinted polymer optical devices