An MBTA employee was inside of a piece of heavy equipment on the Red Line when it toppled off the tracks Sunday evening, officials said. Joe Pesaturo, a spokesman for the MBTA, said the operator had no visible injuries but was hospitalized as a precaution and would be held overnight for observation. The operator was using the equipment to spread ballast on the rails when the machine tipped over in Dorchester near Elm Street, Pesaturo said. The Fire Department responded just after 6:30 p.m. Because buses were running in place of the trains, the incident did not affect service, Pesaturo said. The operator, who was not identified, was wearing a seat belt at the time of the accident, which was under investigation.Alyssa Edes is a Globe Correspondent. Follow her on Twitter @alyssaedes.