Shuttle buses will replace evening Red Line service on the Braintree branch for two consecutive weeks starting in August as the agency pursues maintenance work related to a federal safety inspection.