Inferring a Photospheric Velocity Field from a Sequence of Vector Magnetograms: The Minimum Energy Fit