Optimizing Robot Programs with Continuous Movements