Safe Control Synthesis with Uncertain Dynamics and Constraints