An integrated device for electro-optic modulation and dense wavelength division multiplexing based on photonic crystals