Would have to be a high FPS camera. Some cheap linear rails and a NEMA 17 motor. Of course you would have to get the "sync pulse" out of the camera, then you would probably have to do a delay move to move into position before the next snap.
Sliding it back-and-forth would create too large accelerating/braking forces. Easier approach would be to put camera on a rim of continuously rotating wheel and take shots when it reaches positions of 90° and 270°.
Of course, in my mind, I was thinking of cheap webcams strapped to wood.