Photocontrol of smectic spacing