Safe mode is when the car develops a fault and reduces the power as a get you home measure. Its supposed to avoid being stuck at the side of the road. Only way to cure it is to get the underlying fault sorted. Start by getting the fault codes read by a BMW dealer or reputable independent specialist. from there you will be able to get quotes for the repairs.