A Data-Driven Approach to Synthesizing Dynamics-Aware Trajectories for Underactuated Robotic Systems