John B. Anderson yesterday accused President Carter of allowing "petro politics" to interfere with U.S. support of Israel, and said the president had politicized efforts to resume the suspended Palestinian autonomy talks.

In a pro-Israel speech before B'nai B'rith, the Jewish service organization, the independent presidential candidate said Carter has used the report of the resumption of talks to inflate hopes for peace "by making the prospect of resumed negotiation an implied breakthrough to peace."

Carter, Anderson charged, had blurred, "the distinction between our nation's dedication to the cause of peace and an individual's eagerness to be elected."

On Wednesday, after a telephone conversation with special U.S. Mideast envoy Soll Linowitz, Carter told a meeting of union leaders that Egyptian President Anwar Sadat and Israeli Prime Minister Menachem Begin had agreed to get the talks moving again.

The "timing and flavor" of the president's remarks were "insensitive" and overly optimistic, Anderson said, adding later: "Surely this a subject and an occasion calling for understatment and not for the kind of commentary that smacks of campaign rhetoric."

Anderson used the attack to illustrate his basic message before the Jewish group: beware of election-year friends -- who are caught up in "the election-year syndrome."

Without naming either Republican Ronald Reagan or Carter, both of whom made separate appearances before the group. Anderson said the syndrome causes incumbents "to side-step three preceding years of petro politics."

It makes mountains of arms to Arab states disappear. It produces memory lapses; diplomatic sniping, charges of intransigence, press leaks and waffling all fade out."

Referring to Reagan, the Illinois congressman said: "Candidates whose forays into foreign affairs have been few suddenly discover Israel. And they assault the incumbent for not valuing Israel sufficiently for appeasing the oil states, for being statesmanlike at Israel's expense."

In contrast to his major party opponents. Anderson contended he has steadfastly supported Israel during his 20 years in Congress. "This is where I stand, and where I have stood. This is what I believe in over the last decade. This is what I have been, and who I am," he added.

Anderson, who has been courting Jewish voters for months, received a warm, if not an overwhelmingly enthusiastic, reception. His low key, almost scholarly speech was interrupted by applause 22 times, compared to 30 interruptions Reagan received Wednesday night from the same group.

Anderson said the fundamental problem in the Mideast is not the Arab-Israel conflict, but the United States' "failure to free ourselves from the thrall of OPEC" (Organization of Petroleum Exporting Countries).

"The Carter administration has allowed an oily sword of Damocles to hang over our heads," he added.

"It is the fear of an oil embargo and economic dislocation which is responsible for the contradictory, self-defeating Carter approach to the Arab-Israel dispute . . . The power of political oil warps our principles. It skews our priorities. It clouds our judgment."

Carter's Mideast policies are based on "two doubtful propositions," he said. "First, that ending the Arab-Israel dispute will be a panacea for the region's problems including insecurity in the supply of oil. Second, that is the Israeli government, and not those who refuse to negotiate with it, which is responsible for the failure to achieve a wider settlement."

Anderson also put in a plug for his proposal to put a 50-cents-a-gallon tax on gasoline as a way to reduce dependence on foreign oil.

Israel, he said, shouldn't be viewed as "a strategic burden" or, as Reagan does, "in strategic terms."

Our commitment to Israel grows out of shared ideals and principles," Anderson said. "We share a devotion to democracy. We share a pioneeringg experience. We share an ethnic rooted in the Bible. We have both been havens for the oppressed."

Reagan's "emphasis on Israel's military prowess gives me pause," he said. "We should not expect Israel to utilize its fighting skills in misconceived adventures which a coherent diplomacy could defuse and prevent."

"We should be prepared to use Israel's expertise, its technical skills, its intelligence -- even its bases and facilities in time of emergency," Anderson said. "But no one should think that Israeli soldiers would become our military surrogates."

Later, at a news conference, Anderson said he was not criticizing special negotiator Linowitz for inflating hopes of a Mideast peace. Instead, he said he was attacking Carter for going before union leaders and "waving around" documents indicating resumption of the talks.

Carter, he said, was "trying to send out signals that all is well, to try to draw more out of an announcement than is there."