LAOF: Robust Latent Action Learning with Optical Flow Constraints