Optical control of an integrated interferometer using a photochromic polymer