Environmentalists are on the verge of winning a long and desperate gamble with Nevada over casino-threatened Lake Tahoe.

With backing from conservative Nevadans who traditionally have opposed efforts to limit development at the soenic and pristing High Sierra lake, a compromise is near that would protect Tahoe from further casinos and increased air and water pollution.

"I'm definitely optimistic," said Charles Warren, chairman of the Council on Environmental Quality and chief mediator of the proposed settlement. "I think it's likely that we have a compromise that will jell within two or three weeks."

The settlement, an amendment to the Nevada-California compact on Tahoe, would prohibit further casinos at the impriled lake completed federal purchase of two undeveloped casino sites, and change the structure of the Tahoe regional planing agency. According to California Resources Aministrator Huey Johnson, whose proposal to make Tahoe a national recreational are may have proposal to make Tahoe a national recreational area may have prodded Nevad into the compromise, the composition of the governing board remains the last serious obstacle to approval of the settlement.

By any standards, Tahoe is more than just another scenic wonder that has become a battleground between environmentalists and developers.

Geologists regard it as a primordially pure alpine lake with characteristics shared by only one other body of water - Lake Baikal in the Soviet Union, which also is threatened with pollution. The 25,000-year-old Lake Tahoe covers 193 square miles with water of such intense blue purity that objects can be seen at a depth of 100 feet or more.

The lake extends to a dept of 1,645 feet, holding enough water to cover California to a depth of 14 inches. Its waters teem with a landlocked salmon and four varieties of trout. More than a century ago Mark Twain referred to Tahoe as "surely the fairest picture

Because half of the lake is in Nevada, the problem that threatens Tahoe also has been unique. Two decades ago acsinos based in Reno, 50 miles away, began to experiment with extensions at Tahoe. They were encouraged by the government of little Douglas County, which saw gambling as a source of revenue and torism.

When a bistate commission was set up a decade ago to regulate growth and development at Tahoe, Nevada insisted on a provisio that required a majority fo the delegations of each state in order to block any casino. Local interests who were most responsive to casino pressure were given a dominant power on the governing board.

The result has been a choking, congested development that makes the south shore of Lake Tahoe, surrounded by state parks and a national forest, look like a little Las Vegas, Douglas Country has been so uncaring of the consequences that it was recently sued by the Justice Department for dumping sewage into the lake in excess of the standards allowed by the Environmental Protection Agency.

In the face of a seeming triumph by the casinos, an unusual coalition of political liberals and conservatives has formed to bring an end to gambling expansion. The effort has been pushed by Sens. Alan Cranston and Paul D. Laxalt - an alliance Laxalt calls "the odd couple." The California Democrat and the Nevada Republican are working toegether in behalf of a pending appropriation that would provide up to $25 million for buying two prospective casino sites of 40-plus acres and adding and land to the Toiyabe National Forest.

At the same time, the administration of California Gov. Edmund G. (Jerry) Brown Jr. has used what Laxalt calls "effective pressure" on Nevada by refusing to widen existing roads - thus limiting the lucrative California tourist trade - until Nevada agrees to prohibit new casinos at the lake. Nevada has always resisted this prohibition, but the mood is changing, the earch affords."

"I subscribe to the belief that enough is enough," says Laxalt, who owns an interest in a Carson City casino. "There's sufficient gambling at Lake Tahoe. Unless we do something to curb the pollution, we're going to be in serious trouble."

Most environmentalists think that trouble is at hand. The League to Save Lake Tahoe has a lawsuit pending in federal court that would slap highly restrictive controls on development to maintain the air and water purity at the lake. Carbon monoxide levels at the south shore of Tahoe in August have sometimes exceeded Los Angeles' levels.

If the Tahoe settlement jells, as Warren expects, it will demonstrate that even that appears to be a hopeless environmental cause can be turned around when there is sufficient political pressure.

Much of the credit for the pressure goes to Johnson, the California resources administrator, who last winter proposed that Tahoe be made a national recreation are. The proposal was denounced as visionary and costly, and Cranston declined to back it after he found it had little support in the California and Nevada congressional delegations.

However, the plan struck an exposed nerve in Nevada, which always has been sensitive to federal intervention and the implied threat of federal regulation of the state's gaming industry. While Johnson still believes that the gambling interests would "pave over the lake if they would get away with it," Laxalt and Warren think gambling has gone as far as it cat at land remains in U.S. Forest Service Lake Tahoe.

If the revised agreement is approved, it will mean that the gaudy casinos will be confined to a small strip on the south shore and an even small pocket at the lake's north end. Nearly two-thirds of the lakeshore land jemains in U.S. Forest Service ownership and looks much the same as it did a century ago when Mark Twain first sank its praises.