U.S. Marines and Italian infantrymen waited in ships in the Mediterranean today while their diplomatic representatives insisted that Israel pull back its forces from positions in West Beirut before the peace-keeping troops go ashore. A second contingent of French soldiers disembarked to join the unit that arrived yesterday.

In an incident that apparently was not related to the planned deployment of the multinational force, two U.S. military officers were among four U.N. observers team in Beirut were killed when their jeep hit a mine nine miles east of Beirut. The Pentagon identified them as Army Maj. Randall A. Carlson, 35, of Derwood, Md., and Air Force Maj. Harley S. Warren, 34, of Valdese, N.C.

In Washington, President Reagan said he felt "great regret" over the deaths but added that the two U.S. officers "were not in any way connected with the multinational force."

[The State Department expressed optimism that snags holding up the deployment of the multinational force had been resolved, and administration sources said that the troops were expected to be in position by Tuesday or Wednesday. Details on Page A27.]

Both the United States and Italy reportedly were insisting that Israel remove its forces from all of West Beirut, including the southern districts where the airport and the Palestinian refugee camps are located, before their contingents of the peace-keeping force would land. But there were indications that this position was being softened and that the two nations might allow the Israelis a token presence at the airport.

A spokesman for the U.S. Embassy said that he doubted that the Marines would go ashore Sunday, as officials in Washington had expected. U.S. special envoy Philip C. Habib and his assistant Morris Draper met with Israeli Defense Minister Ariel Sharon to try to resolve the dispute.

An Israeli Foreign Ministry spokesman denied that Habib had issued "an ultimatum" calling for an Israeli pullback, saying that was "a ridiculous report from Beirut," Washington Post correspondent Edward Walsh reported from Jerusalem.

[Israeli media reports, however, quoted Habib as saying that the Marines would not land until Israeli troops were withdrawn. Sharon told Habib that all Israeli forces would be out of the Lebanese capital, including East Beirut, by Wednesday, sources said.]

In the third shooting attack on Israeli troops in West Beirut in three days, an unidentified gunman shot and wounded an Israeli soldier on patrol. The Israelis later carried out a house-to-house search for the assailant, Beirut radio reported. One Israeli soldier has been killed and three wounded in the incidents.

Three other Israelis also were wounded today when their armored personnel carrier hit a mine in a West Beirut street.

The peace-keeping force -- which initially is expected to be made up of approximately 800 U.S. troops, 1,100 French and 1,100 Italians -- is returning here to help guarantee the safety of civilians in the wake of the massacre of Palestinians in refugee camps carried out by rightist Christian militia forces from Sept. 16-18.

An Israeli Army spokesman confirmed that Israel would complete its withdrawal from most of the western sector by Sunday night. But he added that Israel still wanted to maintain a military presence at the port, airport and several other strategic points as well as to retain the right to enter West Beirut.

Italy's ambassador, Franco Lucioli Ottieri, told reporters this morning that this plan was unacceptable to both his government and Washington. "As long as the Israelis are in the port, we and the Americans won't disembark."

Later, he said the Italian position was that "if the Americans don't disembark, then we don't." Four Israeli armored personnel carriers, two jeeps and roughly 50 soldiers were still present inside the port perimeter when the unit of about 350 French troops arrived at midafternoon to join the 350 paratroopers who already had arrived.

Ottieri said he had been told by the Lebanese Army that Israel had agreed to withdraw its troops from the port area and was no longer insisting on the right to send patrols into West Beirut after withdrawing.

He said it was possible that the three members of the multinational force finally would agree to an arrangement under which the Israelis would be allowed to maintain a small presence at the international airport and to land planes there.

The ambassador said that all three governments still were awaiting the outcome of Habib's talks with Sharon. Draper was expected back here tonight or early Sunday morning with word on whether a final accord had been reached.

Beirut press reports said that newly elected Lebanese president Amin Gemayel was seeking to have the entire capital freed of all Lebanese militia and Israeli troops and to have the multinational force operate in both East and West Beirut.