Magnetic field shimming in MRI with controlled polarization and SAR limitation