Safely Learning Controlled Stochastic Dynamics