Wealthy professionals, including doctors, lawyers and accountants, are finding a bonanza in a provision of the 1974 pension reform act that was designed to limit the amount of money corporate executives could squirrel away to avoid taxation.

Under the provision, which is now under attack in both the House and Senate, the professionals can shelter well over $100,000 a year from federal tax. By conservative estimates, someone 45 years old who begins putting $134,611 a year into such a pension fund could retire at 55 with a fund worth $1.88 million that pays a yearly benefit of $136,000.

Other analysts calculate that an affluent doctor or lawyer who used what tax lawyers call more "aggressive" tactics--pushing closer to, but not quite over, the edge of the law--could, starting at age 35, avoid taxation on $56,000 a year and end up at age 65 with a $12 million fund paying out a retirement benefit of $1 million or more a year.

Taxes must be paid when the retirement benefits are received, but the deferral of tax liability creates an enormous benefit for someone who can use the money in the interim for investment purposes.

Based on a relatively modest 10 percent interest rate, the ability to postpone $1,000 in taxes for five years is the equivalent of a $379 tax break. If the tax is postponed for 10 years, the value of the break increases to $614, and for 30 years, it is a tax savings of $943, or almost the entire amount originally owed.

A person in a 50 percent tax bracket who is able to avoid taxation for 10 years on a single contribution of $134,611 to a pension fund would defer taxes of $67,305. After 10 years, the accrued interest would amount to a tax break of just over $25,000.

Moreover, the money does not have to be kept in the pension fund, as it does under other retirement systems, Individual Retirement Accounts (IRAs) and Keogh plans. A doctor with his own pension fund who wanted to buy a boat or vacation home, for example, can borrow the money from the fund. In addition, the fund is not subject to the estate tax.

These large tax benefits are a main reason behind the current wave of conversions of law firms from partnerships to corporations.

In Washington, where the annual compensation of senior partners can reach or exceed $500,000, the firms that have incorporated or are in the process of incorporating include Steptoe & Johnson; Hogan & Hartson; Miller & Chevalier, and Finley, Krumble, Wagner, Heine, Underberg & Casey.

For the vast majority of people, pension tax benefits are limited to far smaller tax breaks under union and corporate plans; to IRAs, which are limited to $2,000 a year, and to Keogh plans for partnerships and small businesses, which have a ceiling of $15,000 a year.

By incorporating, doctors, lawyers and other professionals are allowed to capitalize on the most beneficial provisions of the 1974 law, instead of being restricted to the Keogh plan's $15,000-a-year deferral.

The much higher corporation levels were set in 1974 during an intense legislative battle that largely went unnoticed by the public and press in the larger debate over ways to protect workers, who at that time had few protections governing their contributions to retirement plans.

The corporate pension system, which unlike all the others has been indexed to the growth in inflation, permits two types of plans with different ceilings. Under one plan, the annual contribution is limited to $45,475. The other type limits the contribution to an amount that would fund a pension paying no more than $136,425 annually upon retirement at age 55.

The law, however, permits a corporation to set up two plans, with the beneficiary able to get the full amount from one, and 40 percent of the maximum breaks from the other. The result is that for someone 45 years old planning to retire at 55, the maximum annual tax deferred contribution would, by conservative estimates, be $134,611; and by more "aggressive" calculations, $157,000 annually.

The 1974 pension law also included special antidiscrimination provisions designed to prevent corporations from cutting out lower-level workers from company plans.

However, professionals such as doctors and lawyers have relatively few employes and can use sections of the law to minimize, or evade altogether, requirements that the benefits be available on a proportional basis to a cross-section of all workers within a corporation.

In the case of doctors and lawyers, secretaries, medical technicians, nurses, messengers and other employes theoretically would have to be eligible for at least small pensions and tax breaks under a plan providing king-sized breaks for their employers.

But sections of the law allowing firms to integrate pension programs with Social Security benefits function, according to congressional an-alysts, to "integrate out" low-paid employes--reduce their special pension benefits to little or nothing. In effect, for these workers most or all corporate pension benefits are eliminated by off-setting contributions to the Social Security system.

Congressional sources studying pension plans say that some doctors and lawyers are trying to eliminate all responsibility for providing pension benefits to employes.

To achieve this goal, the low-level employes are first fired, then hired by a separate corporation and "leased" back. Because they are no longer employes of the doctor's or lawyer's corporation, they do not need to get the same pension benefits.

Rep. Charles B. Rangel (D-N.Y.), chairman of the Ways and Means oversight subcommittee, has introduced legislation to significantly cut back on the tax breaks and has scheduled a hearing on the bill for tomorrow. Senate Finance Chairman Robert J. Dole (R-Kan.) has publicly declared his intention to restrict the breaks, and has indicated that he plans to include legislation in an omnibus tax bill to be put together later this summer.

The likelihood of restrictive legislation has produced an intense lobbying effort to preserve the breaks. Members of Congress are being inundated with protesting letters, many from law firms, and 75 different organizations and people sought to testify at the Rangel hearings, a number that has been pared down to 25.

This lobbying is on behalf of a relatively small but affluent segment of the population. The Rangel bill, according to congressional analysts, would reduce the pension tax breaks and retirement benefits for only 200,000 persons out of a total of 45 million workers covered by some form of a pension.