Interior Secretary James G. Watt yesterday wrote off opposition in California to offshore oil drilling as a "classic example" of the conflict between "narrow interests" and the "broad public interest" in achieving national energy independence.

In congressional testimony, Watt said he would push ahead with plans to expand oil company opportunities to bid for exploration rights on the outer continental shelf off California and other U.S. coastlines.

Watt's words came on the heels of what he called an "extremely successful" lease offering last week in which oil companies bid $2.3 billion to search for oil in the Santa Maria Basin off Santa Barbara and Southcentral California.

Watt allowed the Santa Maira bidding to go ahead despite a federal court injunction against issuing leases in 32 of the 111 tracts the Interior Department offered. Oil companies made bids on 81 of the 111 tracts, including 21 in the group enjoined by the court.

Watt said he went ahead because the court had not enjoined him from receiving the bids, only from issuing the leases.

California Gov. Edmund G. (Jerry) Brown Jr. and other state officials, including several Republicans, have expressed concern about plans to open up the California shoreline to additional offshore drilling.

Also in the works is a Watt plan to open four additional basins off Northern California. Watt said he would make a final decision later this month on bidding in those basins, which border several scenic coastlines and include the home waters of the gray whale. The Carter administration had rejected plans to offer leases in the northern basins.

That proposal has come under strong attack from environmentalists.

Watt told a congressional subcommittee that "careful consideration is being given to all aspects" of the decision on the northern California bidding. But he contended that offshore drilling is not necessarily in conflict with the environment and might be environmentally preferable to other means of obtaining oil.

"Offshore energy activities do not preclude a healthy environment," Watt said. "The great news is that we can have both."

Watt said he found Brown's opposition understandable but parochial. "If I had been governor of California," the interior secretary said, "I may have made the same comments." But he added that the national interest overrode local concerns and that California has no more right to lock up offshore oil than Watt's home state, Wyoming, has to block national access to its mineral resources.

Watt also contended that offshore drilling was environmentally safer than bringing oil tankers, with their risk of collisions and spills, into American ports.

Watt said the Interior Department would speed up its offshore lease offerings nationwide, making 42 lease sales between now and 1986. The schedue includes 10 offerings in the Gulf of Mexico, 16 off Alaska, five off California and six off the Atlantic Coast. Highest priority, he said, would be given to four "frontier" basins off Alaska.