losing weight during pregnancy

Is it safe to lose weight during pregnancy (eating healthy and getting safe exercize) if you're overweight?