Integrated bistable optical devices