Safe Trajectory Sampling in Model-Based Reinforcement Learning