Amid signs of optimism for a peaceful resolution of the Beirut siege, Defense Minister Ariel Sharon has been waging an increasingly open campaign against U.S. special envoy Philip C. Habib's plan for withdrawal of Palestinian guerrillas from the Lebanese capital, Israeli sources report.

The reported campaign has resulted in strains between the Israeli defense establishment, which is growing impatient with diplomatic efforts to end the crisis, and the Foreign Ministry, which is expressing cautious optimism about Habib's mission and is reluctant to set a deadline after which Israel will impose a strictly military solution.

Differences over the issue have been simmering for some time in the Cabinet of Prime Minister Menachem Begin, but the strains are now most clearly defined by advocates representing the military and diplomatic establishments outside the Cabinet.

While Sharon publicly has been circumspect on the issue, the Israeli sources say he personally has supervised a campaign of leaks in the Israeli press designed to discredit Habib's proposals even before they were formally presented to Jerusalem.

Sharon's campaign is believed to reflect his own views and those of a significant portion of Israel's defense establishment, but not necessarily those of the prime minister. An adviser to Begin said today, "Obviously there are differences between the Defense and Foreign ministries. I wouldn't call it a clash, but it reflects their different viewpoint of the situation in Beirut."

The campaign reached a peak last night when two close advisers to the defense minister telephoned a number of Israeli journalists and accused Habib and other U.S. diplomats in Beirut of collaborating with the French government to draft an evacuation proposal that would allow Palestine Liberation Organization guerrillas to remain in West Beirut after an Israeli withdrawal.

The Sharon aides called the Habib plan a "fraud" and a "piece of trickery," and they accused the envoy of misleading officials in the U.S. State Department.

Identified only as "authoritative sources close to the defense minister," the aides offered identical versions of an alleged connivance in which only a few hundred guerrillas would be evacuated from West Beirut, leaving the majority of the 6,000 to 9,000 fighters there to remain sheltered behind a French and American multinational force.

The aides also charged that Habib and the U.S. ambassador to Lebanon, Robert Dillon, had reneged on a promise Habib made to Begin early in the negotiations to the effect that the bulk of the guerrillas would be evacuated from Lebanon before the planned multinational force is deployed.

Now, the Sharon advisers alleged, Habib favored deploying the French forces simultaneously with the evacuation of only a small number of PLO fighters, specifically those who have been wounded or who hold passports of their destination country.

According to the scenario described by the Sharon advisers, Habib's plan would result in the deployment of U.S. Marines soon after the positioning of French troops, creating a protective screen for the thousands of armed guerrillas who would remain in West Beirut.

Asked whether the Foreign Ministry shares Sharon's view, a ministry official today replied, "I don't believe there is a conspiracy of the Americans, the French and the PLO. I don't believe a thing like that could be possible. We haven't seen any signs of a conspiracy."

The official said the "general" policy of Israel is still to allow a multinational force to be deployed after the PLO guerrillas have left, but that the "modalities" of the arrangement still have to be worked out. Those details, the official said, include the timing of the withdrawal and deployment and the numbers of guerrillas withdrawn in each phase of the operation.

When pressed about Sharon's campaign to discredit the Habib evacuation proposal, the official said, "I'm not responsible for the defense minister. From our point of view, there is no discordance whatsoever. We have cautious optimism."

The allegations by the Sharon aides were similar in tone to those contained in a dressing-down that the defense minister gave last Wednesday to William Brown, the U.S. deputy chief of mission in Tel Aviv. Sharon was reported to have accused Habib and Dillon of sending mendacious reports to the State Department on Israeli bombing and ground advances into West Beirut. Those accusations were also leaked by Sharon's advisers, sources said.

In what was described as a "harsh monologue," Sharon, according to his aides, accused Habib and Dillon of exaggerating the intensity of Israeli bombing and giving false information to the effect that Israeli troops had already begun to divide the city and isolate PLO pockets in the north and south. Embassy officials confirmed that the Brown-Sharon meeting took place, but have refused to comment on the affair.

The outburst was reminiscent of the tongue-lashing that Begin gave to U.S. Ambassador Samuel W. Lewis last year after the Reagan administration suspended a joint strategic cooperation agreement following the Israeli bombing of Iraq's nuclear reactor near Baghdad.

Lewis is understood to have remained silent during that outburst, in which Begin admonished the Reagan administration not to treat Israel like a "banana republic," and to have commented sardonically to aides afterward that he had seen better "political theater" before, but never before such a small audience. The meeting was private.

Relations between Habib and Sharon have shown signs of strain before. Late last month, the defense minister was reported to have pounded his fist on the table in a meeting with the U.S. envoy near Beirut and told him that Israel was opposed to any interim solution or separation of forces as a preliminary step to the complete withdrawal of PLO guerrillas from Lebanon.