POLITICIANS OF ALL stripes have a rare opportunity to strike a compromise on Social Security next year. All will regret it if they pass up this chance.

For President Reagan, the problem is that his calls for drastically reduced Social Security benefits threaten his political acceptability to blocs of voters he cannot afford to alienate.

For House Speaker Tip O'Neill, the trouble is equally serious, if less immediate. If Congress once again fails to put Social Security on a sound financial footing and Social Security deficits continue or recur after a quick fix, the solid existing support for the jewel of the New Deal may crumble, and the present system may be scuttled or changed beyond recognition.

Thus they must find a way, together, to increase taxes or cut Social Security benefits enough to close the system's deficits. Those deficits, all members of the National Commission for Social Security Reform agree, will come to between $150 billion and $200 billion between now and the end of the 1980s, and 1.8 percent of taxable wages over the next 75 years.

The central issue is whether a compromise exists that will permit both the president and the speaker honestly to tell their various supporters that they have achieved their most essential respective objectives.

The speaker will not accept sharply curtailed benefits no matter how much the president may want to use Social Security cuts to balance the budget. The president, on the other hand, will veto a bill that does not move Social Security toward the long-run balance that conservatives seek. Neither side has the votes to overwhelm his opposition. Obviously, a compromise is necessary, and such a solution is both more politically possible than might seem likely, and necessary right now.

The compromise would include the following changes:

Bring into the Social Security system new federal employes, federal employes with less than five years of service, and employes of nonprofit organizations. Contrary to popular belief, 80 percent of federal employes will eventually work long enough in the private sector to become eligible for Social Security, even though they have spent most of their working lives not contributing. They receive these benefits -- large in relation to the payroll taxes they have paid -- because they have worked long enough at a job covered by Social Security to earn eligibility for benefits. The Social Security system treats them with the same generosity it accords workers who have spent a full working life under the Social Security system at low wages. Gain: $29 billion.

Raise the Social Security tax on self-employed persons to the full level, but let them deduct half of it on their income taxes. Right now, regular employers pay 50 percent of Social Security taxes, matching their employes. These employers can deduct their contribution on their income tax. The self-employed pay only three-quarters of this combined contribution, although they receive the same benefits as regular employes. They can deduct none of their contribution. Allowing the self-employed to deduct half of a full contribution to Social Security would put them in virtually the same position as regular employes, but would result in a gain of $17 billion to the Social Security coffers.

Move the proposed 1990 payroll tax of 6.2 percent to 1984. The current rate for Social Security benefits other than hospital insurance is 5.4 percent. The increase will not only help sustain Social Security, it will help reduce the overall federal deficit. Gain: $136 billion.

Tax up to half of Social Security benefits under the same rules that we now tax unemployment benefits, and return the proceeds to Social Security. This tax would kick in when the income of joint filers exceeds $18,000, or single filers exceed $12,000. That provision would have no effect on anyone wholly dependent on Social Security and would be the fairest way to cut benefits. Gain: $35 billion.

Delay the 1983 cost-of-living adjustment from July 1 to Oct. 1. Most analysts agree that the Consumer Price Index used for making the adjustments overstated inflation during the late 1970s and early 1980s. A three-month delay in the adjustment is an inexact, but simple, corrective. Gain: $25 billion.

The total short-term gain for these five steps would be $242 billion, more than enough to solve Social Security's short-term problems. This cushion offers leeway for the political horsetrading that will inevitably accompany any negotiation. And some of it might be retained to deal with unforeseen developments in Social Security cashflow.

These short-run steps will not be wholly to Speaker O'Neill's liking, but they are closer to his positions than to those of the president. So here is the way to make the 75-year results more to Reagan's liking.

The changes described above will produce about two-thirds of the long- term deficit reductions that the National Commission has agreed need to be made. With three further changes that would produce no political or economic complications for any retiree-to-be who is today over the age of 32, we can nearly double these long-term savings:

Reduce benefits by 10 percent relative to current law, starting in 2015.

Raise the normal retirement age one year, from 65 to 66, phased in from 2015 to 2024. Again, no immediate pain WITH relatively small problems far in the future.

Increase payroll tax on employes and employers by another half a percent in the year 2020. No short-term impact, a modest increase in 37 years, and a large decrease in the deficit.

Altogether, these long-term measures would produce savings for the Social Security system more than 25 percent greater than the National Commission has agreed are necessary. (In actuarial terms, this plan would save 2.27 percent of all taxable wages over the next 75 years, instead of the commission's target of 1.8 percent.) Thus, there is room to put off for a few years any change that might be particularly divisive, if delay were politically necessary.

The point is that President Reagan will be able to tell his conservative supporters that in a tough political environment, he has done something no other president has done -- reduced significantly the cost of the largest entitlement program in the federal budget.

And Tip O'Neill will be able to tell his supporters that he has prevented significant cuts in their benefits and they will have many years to try to undo long-run changes that they find objectionable.

And the real beauty of this solution is that both politicians can demonstrate that they have joined together to solve a serious national problem in a statesmanlike and farsighted manner.