In-Situ X-Ray Measurements of Light-Controlled Layer Spacing in a Smectic-A Liquid Crystal