A federal judge presiding over the trial of Teamsters union President Roy Williams expressed his annoyance today at a government witness for his repeated attempts on the witness stand to explain away damaging conversations secretly tape-recorded by the FBI.

U.S. District Court Judge Preston H. Marshall announced at one point -- while the jurors waited in another room -- that he could no longer remain silent while the witness, William Webbe, kept denying the truthfulness of statements that Webbe had said were correct before a federal grand jury two years ago.

The judge insisted that the grand jury testimony be read into the record to show the inconsistencies.

The conflicts dealt with a May 21, 1979, tape recording of a late-afternoon conversation in the offices of Allen Dorfman, a Chicago insurance executive and longtime Teamster ally who has been accused with Williams of plotting to bribe Sen. Howard W. Cannon (D-Nev.).

The tape began with Dorfman winding up a phone call with Cannon himself and then deploring the treatment that he said the senator had gotten in recent weeks.

"We have f----d him around like no man has ever been f----d around," Dorfman declared on hanging up the phone. His listeners were Webbe, who was and still is one of Dorfman's top aides, and Don Peters, a Chicago Teamsters official who had happened to stop by for a visit.

With that preface, Dorfman went on to recount how Teamsters boss Williams had made "a firm commitment" to Cannon the previous January to deliver a piece of real estate in Las Vegas that the senator and his neighbors wanted to buy from the Teamsters Central States Pension Fund. In return, the government has charged, Cannon was to help sidetrack trucking deregulation legislation by steering it to the Senate Commerce Committee, of which he was chairman.

The real estate transaction, however, was repeatedly turned down by the pension fund's independent asset managers, Victor Palmieri & Co., Inc., and Dorfman was expressing his frustrations.

Recalling a Jan. 10, 1979, meeting in Cannon's Las Vegas office, Dorfman said that the Nevada senator had asked him and Williams, "and you fellows will take care of the property thing?" and Williams, according to Dorfman, had replied, "Don't worry, it's all taken care of."

Webbe, who had been waiting in an outer office during the Jan. 10 meeting, chimed in with his agreement. "Roy said you take care of your end and we'll take care of our end for you," Webbe told Dorfman.

Under questioning by defense lawyers today, however, Webbe, who has been granted immunity from prosecution in return for becoming a government witness, insisted that he had been exaggerating to support his boss at what amounted to a "Happy Hour" in Dorfman's suite after the other employes had gone home.

Webbe also denied that he had ever heard Williams say to Cannon, " 'you take care of your end and we'll take care of our end for you.' "

Minutes later, with the jury out of the courtroom, Judge Marshall, who has twice warned Webbe against perjuring himself, said he was tired of sitting back and listening to Webbe testify "that they were sloshed, that it was Happy Hour . . . and on and on and on."

The judge pointed out that Webbe, after having been granted immunity from prosecution, had heard portions of the tape in 1980 and told a grand jury he would dispute only one thing he had heard, a misstatement on his part about how long he had been working on the Las Vegas real estate transaction.