The fate of the Nicaraguan contras, or "freedom fighters" as President Reagan prefers to call them, is in doubt. Despite the impact of Lt. Col. Oliver North's impassioned testimony on their behalf, polls show that the public has not been convinced of the necessity to aid their cause, and congressional opinion is even more dubious.

These doubts are fully understandable. The contra paramilitary campaign shows little sign of being able to win against the Sandinistas and practically no sign of generating any meaningful degree of political support within Nicaragua. Its operations are reportedly accompanied with repulsive brutality, and the nakedness of American support has its inevitable counterproductive effects in a Latin America long resentful of American intervention. The objective, a contra victory in Managua, would from all appearances initiate just another authoritarian regime there, perhaps military in composition, probably little better than Somoza's or the Sandinistas' except for the exclusion of Cubans and others hostile to the United States.

But abandonment of the contras is no solution. The Sandinista regime is blatantly totalitarian, an island in the democratic tide running in Latin America. Its open subservience to and support by the Cubans and the Soviet Union are an inherent menace to the United States and its allies in the area, since its "revolution without frontiers" would certainly be resumed if it saw the opportunity to move against its neighbors by subversion or military force. And withdrawal of American support could well unleash onto neighboring Honduras, El Salvador, Guatemala and Costa Rica an undisciplined horde of 15,000 trained paramilitary troops to make their living any way they could through banditry, drugs and service in the various private armies that have been only temporarily brought under some degree of control by governments struggling to establish democratic rule.

The solution to this dilemma lies in a new start in our policies and programs for Nicaragua, along the lines we should have followed from the beginning. To date, we have had the paramilitary cart in front of the political horse, in violation of the first principle of paramilitary operations that they must rest upon a firm political base. When such a base is not sufficiently developed, it must be built by identifying a cause, developing an organizational structure and recruiting popular support, well before the first shots are fired and certainly before raiding parties are sent from the outside. This is not an easy task when faced with a totalitarian regime, and it cannot be achieved over the short term. But it is nonetheless essential.

The present state of affairs in the region clearly offers an opportunity for such a program. President Oscar Arias of Costa Rica has proposed a regional peace effort which, if applied, would require Nicaragua to give amnesty to its contra opponents and liberalize its political processes. The price would be the cessation of American support for the contras. Adherence to the agreement would be policed by the larger Contadora powers of the region (Mexico, Venezuela, Colombia and Panama with the backing of Argentina, Brazil, Peru and Uruguay), with appropriate Organization of American States and United Nations support. Neither the Sandinistas nor the Reagan administration has accepted this formula yet, and the reservations of both are fully understandable. But a vigorous effort to achieve agreement could result in a workable compromise.

The incentive for the Reagan administration could be the bleak prospect its program of continued aid to the contras faces. The incentive for the andinistas could be relief from paramilitary attacks and an opening of normal relations with its Central American neighbors. The incentive for the neighboring nations could be secure borders policed by the Contadora nations.

Such an arrangement would not be the end of the contest, but a new beginning. In preparation for such a development, the contra forces should immediately be given an intensive course in political action. They would be expected to carry on within Nicaragua under an amnesty. They should become the political rather than the paramilitary shock troops and leaders of the democratic cause in Nicaragua.

While the United States would be barred from future "support" of such actions under the agreement, it could provide "resettlement allowances" for the troops that had served the cause to date, allowing them to integrate themselves into Nicaraguan society and recapture the revolution against Somoza, which the Sandinistas stole from many of them. If the Nicaraguan political scene remains open, they will have no need for paramilitary action; if the Sandinistas close it down, the political base for future paramilitary operations will have been formed.

The United States could still have an important role in the effort, and one well within the bounds of the agreement it would make. The Jackson (Kissinger) Commission in early 1984 provided the outlines of such a role: major support to the political, economic and social development of the Central American nations.

This is a program that deserves the support of those in Congress who seek the advancement of democracy in Nicaragua and of those opposed to further paramilitary action by the contras. It is one that can strengthen the nations around Nicaragua against possible subversion and support those within Nicaragua working for an opening to their neighbors. The slow, albeit not always smooth, success of the Reagan administration's programs in El Salvador shows that this formula can be more productive than the paramilitary one.

The writer was CIA director under Presidents Nixon and Ford.