D.C. Mayor Marion Barry, saying he wants his administration "to speak with one voice," is moving to impose discipline on errant city employes, who he says "can be in line or they can look for another job."

Barry's tough comments came just a week after the city corrections department, according to knowledgeable sources, fired a budget official who publicly disputed the mayor's estimate that the corrections agency was overspending its budget.

They also came amid reports from city government and Capitol Hill sources that at least two other officials have been told they will be suspended for two weeks without pay in connection with a Washington Post story in which officials challenged Barry's estimates of potential overspending.

Barry, who spoke informally Saturday while en route by plane to the National League of Cities conference here, declined to discuss the corrections department case or the reported suspensions.

The mayor has told reporters several times since his election, however, that he wants to control what city officials say about his policies.

Barry said he does not object to city employes talking to the press, but he objects to " people talking out of line." He suggested that city employes, if they are to talk to the press, should be briefed on the mayor's policies and not talk only about portions of them.

According to friends and city government sources, Michael Hagstad, chief budget officer for corrections, was told he was being dismissed because of incompetence for giving a reporter inaccurate information.

Barry has told reporters that for every major issue that arises during his administration he plans to designate one or two persons who will be authorized to speak on the issues, and he will discipline any other city officials who speak out of turn.

Hagstad's dismissal has prompted new questions on Capitol Hill about reports from Barry that the city faces potential overspending of more than $58 million unless changes are made in the fiscal 1983 budget that began Oct. 1.

Rep. Stewart McKinney (D-Conn.), chairman of the House District Committee, is considering whether to hold informal hearings based on the comments by the city officials who were quoted in the Post and reports of the District government's subsequent action to discipline those employes.

Some city council members and high-ranking city officials privately have expressed dismay over the reports of the dismissal and suspensions, but have declined to discuss the issue publicly.