Optical switching of one-dimensional photonic band gaps and coherent generation of dark and bright optical lattices in quantum wells