President Carter, putting all of his influence and prestige behind the drive to save the Middle East peace process, said yesterday he will fly to Egypt and Israel this week in hopes of breaking the impasse blocking a peace treaty between the two long-time enemies.

Carter's move -- equivalent to staking his entire bankroll of diplomatic capital in the Middle East on one last throw of the dice -- came as his administration scrambled to pull the faltering peace talks back from what had seemed earlier in the day as almost certain collapse.

Hopes that the situation could be turned around began to brighten early yesterday after the Israeli cabinet approved last-minute new proposals that Carter gave to Prime Minister Menachem Begin at a White House meeting Sunday.

Then, following another meeting with Begin and two phone conversations with Egyptian President Anwar Sadat, the White House revealed that Carter will leave Wednesday for talks with Sadat in Cairo and then go on to Jerusalem Saturday evening to resume discussions with Begin.

The dramatic flurry of activity -- prompted by the still-secret new U.S. proposals -- immediately touched off waves of optimism on both the Israeli and Egyptian sides.

Begin, in a meeting here with members of Congress, said, "Now there is a ray of hope." In Cairo, Egyptian Prime Minister Mustapha Khalil, Sadat's principal deputy, went even further, predicting that Carterhs trip "will most likely lead to a signing" of the long-delayed treaty.

At the White House and the State Department, though, the mood was much more cautious. The attitude of U.S. officials was summed up best by White House press spokesman Jody Powell, who, in response to questions about why the president is going, candidly replied: "Without such a major effort, the prospects for failure are almost overwhelming."

Powell and other administration officials also took special pains to emphasize that, at this point, there are no plans for a three-way meeting of the leaders involved, no expectation that a treaty will actually be signed while Carter is in the Middle East and no guarantee that his mission will produce the hoped-for breakthrough.

In fact, U.S. officials insisted that Sadat had not yet been informed fully of the new American proposals and that his reaction to them can't be gauged in advance. Part of the reason for Carter's trip, the officials said, is the president's desire to explain the proposals to Sadat in detail during a face-to-face meeting.

Late yesterday, the White House announced that Carter's national security affairs adviser, Zbigniew Brzezinski, and the State Department's special ambassador for the Middle East, Alfred L. Atherton Jr., have already left for Cairo for advance talks with Sadat.

However, the announcement left unclear whether they will brief the Egyptian leader on the contents of the proposals or whether that will be left for Carter's arrival there Thursday.

In the meantime, diplomatic circles in all three of the capitals involved were filled with speculation and rumors about what the U.S. proposals say.

There were persistent reports that the United States might be trying to assuage Israeli concern over certain Egyptian demands by offering Israel special security guarantees. Other speculation centered on the idea that Washington might try to coax Sadat into concessions with an offer of massive influsions of American financial aid for Egypt.

But both ideas drew denials from U.S. and Israeli sources familiar with the proposals. These sources said flatly that the United States had not proposed nor had Israel requested security guarantees and that it is too early in this latest stage of the negotiations to talk about what sort of aid might be given to either Egypt or Israel.

The only thing known for certain was that the new proposals bear directly on the two issues that have been the major obstacles to a treaty -- whether it should be linked explicitly to separate negotiations on Palestinian autonomy in Israeli-occupied territory and whether it will have priority over the other treaty obligations of the two countries.

That these two questions would become so resistant to solution was not apparent when Begin and Sadat emerged from the Camp David summit meeting last September to announce that, under Carter's mediation, they had agreed in principle to a treaty ending their nations' three decades of enmity.

Under the Camp David framework accords, those issues regarded as not susceptible to immediate solution -- the future status of the Israeli-occupied West Bank and Gaza Strip and peace agreements between Israel and other Arab states -- were split off from the Egyptian-Israeli accord to be dealt with separately.

Everyone involved seemed convinced that reducing the peace agreement to a formal treaty would be a mere technical exercise requiring only a few weeks. Accordingly, a three-month target completion date of Dec. 17 was set, an Begin even jokingly offered to bet Sadat that it could be done in less time.

But by the time actual negotiations began here under U.S. mediation on Oct. 12, other factors had started to have an eroding effect on the negotiating process. Chief among them was the failure of moderate Arab states -- principally Jordan and Saudi Arabia -- to endorse the process started at Camp David.

That caused Sadat to become concerned about isolating himself too much from the rest of the Arab world. To guard against charges that he was making a separate peace at the expense of larger Arab interests, Sadat insisted that the treaty be linked to negotiating an autonomy agreement for the Palestinian inhabitants of the West Bank and Gaza

This demand drew stiff resistance from Israel, where the majority of people fear autonomy for the occupied territories will lead to creation of a Palestinian state threatening Israel's security.

In addition, many Israelis are committed to the belief that the occupied territories are a part of their biblical history and should be kept under Israeli control.

These attitudes have strong representation in the Begin government, a delicately balanced coalition of forces that survives by basing its major decisions on consensus. As a result of these domestic political relaties, the Begin government, while offering to negotiate separately on the Palestinian autonomy question, refused to accept what ultimately became an Egyptian demand for tying the peace treaty to a target date for completing these negotiations.

The second problem arose from Israel's insistence that the treaty contain language making clear that it takes priority over Egypt's mutual defense pacts with other Arab states. Sadat, again fearful of offending his old Arab world allies, has balked at accepting that idea.

These two issues were to lead the negotiations into a series of dead-ends that included, at various points, a tentative agreement by the negotiators that was repudiated by both governments, an unsuccessful attempt by Secretary of State Cyrus R. Vance to work out the differences through a Middle East shuttle mission and, ultimately, the passing of the Dec. 17 deadline with the talks stalemated.

Throughout most of the squabbing, the United States tended to side with Egypt, urging Israel to accept the linkage target date and language watering down the priority clause.

Eventually, the U.S. position led Begin to reject Carter's bid on Feb. 25 for a new Camp David summit and the Israeli leader's visit here to inform Carter tht Israel would make no further concessions.

Begin's unyielding stance through four days of White House talks finally prodded the administration into advancing its new proposals -- proposals obviously more to Israeli's liking, as the Israeli cabinet's action yesterday made clear, but whose reception by Sadat must still be gauged by Carter when he goes to the Middle East.