We propose an optimization-based method to improve contour tracking performance on precision motion stages by modifying the reference trajectory, without changing the built-in low-level controller. The position of the precision motion stage is predicted with data-driven models. First, a linear low-fidelity model is used to optimize traversal time, by changing the path velocity and acceleration profiles. Second, a non-linear high-fidelity model is used to refine the previously found time-optimal solution. We experimentally demonstrate that the method is capable of improving the productivity vs. accuracy trade-off for a high precision motion stage. Given the data-based nature of the models used, we claim that the method can easily be adapted to a wide family of precision motion systems.