Real-time Trajectory Generation via Dynamic Movement Primitives for Autonomous Racing