President Reagan yesterday pledged a "deep personal commitment" to reducing the number of U.S. and Soviet medium-range nuclear missiles in Europe, and said his zero-option plan for prohibiting them entirely was not "a take-it-or-leave-it proposal" to the Soviets.

Saying in a midterm review of his foreign policy that "America remains the greatest force for peace anywhere in the world today," Reagan reiterated to an American Legion audience here that his plan was "the best and most moral outcome" because it would keep both U.S. and Soviet medium-range missiles out of Europe.

But, without abandoning the zero-option proposal, the president also spelled out for the first time four "sound principles" that appeared to open the door to negotiating an interim agreement that would leave each side with fewer but equal numbers of missiles.

Those principles include equality of forces, not counting British and French missiles, no shifting of Soviet missiles from Europe to Asia and an agreement that can be effectively verified.

An administration official emphasized that the principles were not new but that Reagan's enumeration of them in a major foreign policy speech provides "the clearest indication he has given of what he would be open to other than a zero-zero solution."

The president also promised to continue his efforts to gain withdrawal of all foreign forces from Lebanon, and said that "This administration is prepared to take all necessary measures to guarantee the security of Israel's northern borders in the aftermath of complete withdrawal of the Israeli army."

Administration officials said that one of several options is to station U.S. troops on the border as part of a multinational force, which has been opposed by Israel. Details, Page A24.

While Reagan expressed a desire for accomodation in Europe and the Middle East, parts of his speech that dealt with developing countries, especially in this hemisphere, bristled with warnings about "subversion by the new colonialism of the totalitarian left."

He said that the United States faces "a special threat" in Central America, where "The spectre of Marxist-Leninist-controlled governments with ideological and political loyalties to Cuba and the Soviet Union poses a direct challenge to which we must respond."

Apart from these passages, the generally conciliatory tone of Reagan's foreign policy review contrasted markedly with a campaign speech he gave in Boston on Aug. 20, 1980, when he told a crowd of 4,000 cheering Legionaires that the Carter administration had handed military superiority to the Soviet Union.

Yesterday, before a smaller, more subdued audience, the president devoted only three paragraphs of his 35-minute speech to the Soviet military buildup.

He also muted his criticism of Carter by not mentioning him by name and by saying that past actions that had made the United States "an uncertain ally" and a "dubious deterrent to aggression" were not the fault of any single leader or party and could be corrected only by bipartisan efforts.

The Legion audience interupted Reagan with applause eight times. The strongest applause came during his brief review of unpreparedness in the 1930s, when he said that "possibly some of you remember drilling with wooden guns and doing manuevers with cardboard tanks," and added, "We must never repeat that experience."

Administration officials said that the speech, drafted largely by the State Department and national security officials and given to a presidential speechwriter for stylistic polishing, was carefully couched to avoid both provocative criticism of the Soviets and new foreign policy initiatives. One official said it also was designed to provide "a coherent overview" of U.S. foreign policy in a single speech.

The president is known to be sensitive about critical suggestions that his administration lacks a coordinated foreign policy. He demonstrated this yesterday in one of the few departures from his text.

"Let me now address our foreign policy strategy," Reagan said, reading from the TelePrompTer copy of his speech. Then he ad-libbed, "Some people have said we don't have one."

Despite the desire to avoid new intiatives in a speech intended chiefly as a review, Reagan's enumeration of the four principles upon which an agreement to reduce intermediate-range missiles could be based may have provided a benchmark for negotiations on an interim agreement.

Vice President Bush, who was praised by Reagan for correcting "deliberate falsehoods" about U.S. policy, used similar language during his recent trip to Europe, but the president's speech yesterday was the first time the proposals have been put together in this direct summary form.

Allied leaders, facing political opposition and probable demonstrations this summer, told Bush that they favor an interim solution that could be portrayed as a step toward achieving Reagan's call for a total ban of intermediate-range missiles in Europe.

Administration officials said that the language was no accident, pointing out that it had been drafted after consultation with allied officials. But while incorporating some of what these officials said in his speech, Reagan also warned them that the Soviet Union is trying to split the Atlantic alliance.

"The Soviets' fundamental foreign policy is to break the link that binds us to our NATO allies," Reagan said. "Their growing nuclear threat to Europe, especially since the mid-'70s, has a political as well as as military purpose--the deliberate fostering of a sense of insecurity among the peoples of western Europe, and pressure for accomodation to Soviet power. The ultimate Soviet goal is to force the nations to accomodate themselves to Soviet interests on Soviet terms.