The magnetic tunnel junction (MTJ) is one of the most important building blocks of spintronic logic and memory components for beyond-CMOS computation and communication. Although switching of MTJs without magnetic field has been achieved by charge and spin current injection, the operation speed is limited fundamentally by the spin-precession time to many picoseconds. We report the demonstration of ultrafast all-optical switching of an MTJ using single subpicosecond infrared laser pulses. This optically switchable MTJ uses ferrimagnetic Gd(Fe,Co) as the free layer and its switching is read out by measuring its tunneling magnetoresistance with a ΔR/R ratio of 0.6%. A switching repetition rate at MHz has been demonstrated, but the fundamental upper limit should be higher than tens of GHz rate. This result represents an important step toward integrated optospintronic devices that combines spintronics and photonics technologies to enable ultrafast conversion between fundamental information carriers of electron spins and photons.