Microwave power modulation in a magnetostatic surface wave (MSSW) transmission line containing an yttrium-iron-garnet film of thickness 20 μm in the 3–4 GHz frequency band with optical pulses of duration 2 ms and energy of 20 μJ has been investigated. At microwave powers less than 1 mW a slow thermal modulation with magnitude up to 4% and characteristic time of 0.5 ms took place. At power levels 1–100 mW a fast modulation of the transmitted signal with magnitude up to 10% and characteristic time of about 1 μs caused by nonlinear properties of MSSW was observed.