A federal judge sternly rebuked Teamsters President Roy Lee Williams for using his "high office for a corrupt purpose" and sentenced him temporarily to 55 years in prison while medical tests are conducted to determine whether he can be locked up safely.

U.S. District Court Judge Prentice H. Marshall acted under a provision of federal law requiring imposition of the maximum sentence until an appropriate penalty can be determined. But the judge left no doubt that he felt Williams deserves a substantial prison term for conspiring to bribe a U.S. senator with assets from the Teamsters' huge Central States Pension Fund.

Williams, 68, seemed stunned as he sat at a defense table, plastic tubes extending from his nostrils to two green, portable oxygen tanks behind him. The ailing union leader suffers from emphysema, but the tanks he used for occasional relief had been kept hidden in a cloakroom during the trial.

The judge said he had no doubt that Williams "is a very sick man," but pointed out that he is also "the president of one of the most powerful organizations in the free world." If he is too sick to be sent to prison, the judge wondered, "why isn't he too sick to be running the International Brotherhood of Teamsters?"

Williams continued to protest his innocence to the end, telling the judge earlier this week that he had devoted his life to the working man.

"Mr. Williams, you sold the working man out," Marshall said. "You were willing to take the working man's pension fund money and use it, yes sir, use it for your own aggrandizement."

The judge ordered Williams to report to the federal prison medical facility at Springfield, Mo., by April 15 for 90 days of "observation and study." Final sentence will be imposed June 27.

Marshall said he knew the 55-year term, five years for each of the 11 counts on which Williams was convicted last December, "will sound horrendous," but the judge said the law he was using left him no choice until the medical reports are completed.

"If at the end of 90 days, I conclude that Mr. Williams can be handled at a federal correctional institution," Marshall added, "it the prison term will be significantly less."

Co-defendant Joseph (Joey the Clown) Lombardo, 54, who was described at a marathon series of sentencing hearings as a high-ranking captain in the Chicago branch of the Mafia, was given three consecutive five-year terms for a total of 15 years. Lombardo has been imprisoned since December at the Metropolitan Correctional Center here.

Despite denials of Lombardo and his lawyers, the judge said he was convinced "beyond a reasonable doubt" that there is "a domestic cartel" of organized crime and that Lombardo has been an "active functionary in that organization as it exists in Chicago."

Two former Teamster pension fund officials also were convicted. Thomas F. O'Malley, 46, and Amos Massa, 65, were sentenced to prison terms of 30 months and a year and a day, respectively.

Lawyers for all four men said they would appeal. The judge, however, said he would not grant a stay for Williams beyond April 15. Marshall also said he felt Lombardo "presents a substantial danger to the community," and ordered him back to jail.

O'Malley and Massa were released on nominal bonds, pending appeal.

Government prosecutors had asked the court to put Williams on probation on one of the 11 counts and order him to step aside as Teamsters president as one of the conditions of that probation.

Otherwise, Williams would not have to step down until all his appeals are exhausted.

Marshall said nothing on that point today. Chief prosecutor Douglas Roller told reporters that it remains an unsettled question.

In his opening remarks at the 90-minute session, Marshall made clear that he regarded Allen M. Dorfman, the insurance executive who was slain gangland fashion in January, as the chief villain of the conspiracy.

For many years the prime mover of loans from the Teamsters' Central States Pension Fund, Dorfman, the judge said, was a "a boastful, conniving, corrupting person" who instigated the plot to bribe Sen. Howard W. Cannon (D-Nev.) with a piece of Las Vegas real estate that the Pension Fund owned. No bribe occurred.

"I am convinced that this whole sordid episode began when Mr. Dorfman learned that Sen. Cannon had an interest in acquiring this property and then Mr. Dorfman learned that the Teamsters wanted to talk to Sen. Cannon about trucking deregulation," Marshall said.

"Mr. Dorfman decided it was going to be done his way, and the only way he knew was corrupt . . . . I do not know whether Sen. Cannon ever succumbed," the judge said. "He has not been charged. But I am convinced to a moral certainty that at the instigation of Allen Dorfman a conspiracy was put together to corrupt him."

As for Williams, then a Teamsters vice president and top official at the pension fund, the judge expressed little sympathy for his claims that he "didn't know what was going on" when he attended a crucial meeting in Cannon's office in early January, 1979, a meeting arranged by Dorfman.

"Mr. Williams knew who Allen Dorfman was," the judge said, his voice rising. "He knew he Dorfman had been sentenced to the penitentiary for cheating the pension fund . . . . "

At the sentencing hearings, prosecutors sought to show that Williams was also controlled by the Mafia through Kansas City crime boss Nick Civella. But Marshall said he did not think the evidence on that score met the "clear, convincing and unequivocal" standard of proof that he had set. He said the evidence against Williams in this regard, in contrast to that against Lombardo, was "more tenuous . . . , largely hearsay."

In passing sentence, the judge also imposed fines of $29,000 each on Williams and Lombardo and said they, along with Massa and O'Malley, would be assessed costs of the trial, which are still being figured. The government has asked the judge to include in that more than $51,000 in jury fees, subsistence costs and related expenses.