President Carter flew to Eastern Europe today with pledges of American support for Yugoslavia's independence of the Soviet Union and cautious reaffirmation of his commitments to East-West detente.

Toning down his recent anti-Soviet rhetoric, Carter appeared to suggest a possible way out of the increasingly tense impasse over the Soviet invasion of Afghanistan when he expressed readiness "to explore a transitional arrangement" combined with the pullout of "all Soviet troops," from that country.

Yet White House officials cautioned that the president was not initiating any specific steps toward withdrawal negotiations and that a "transitional arrangement" could take various forms.

Nevertheless, the language of Carter's speech at a state dinner here tonight was strikingly different from his harsh comments following the Western summit in Venice yesterday where he told reporters, "I can't imagine our being involved in a negotiation" about Afghanistan. In Belgrade tonight, he appeared to suggest U.S. willingness to explore just such a possibility.

The president returned to language his aides said he first used last February to suggest a possible way out of the Afghanistan impasse.

"We would be prepared to explore a transitional arrangement, to be implemented along with the prompt withdrawal of all Soviet troops from Afghanistan, for the purpose of restoring peace and tranquility in that suffering country," Carter said.

Carter's national security adviser, Zbigniew Brzexinski, later told reporters that the president's earlier effort to propose a "transitional" phase in Afghanistan "perhaps didn't get the attention it should have had."

Brzezinski described the president's proposal as a signal to Moscow that "the United States will be prepared to consider not only a nonaligned, independent and neutral Afghanistan -- free of Soviet forces -- but also some transitional arrangement designed to provide for security and stability in that country as Soviet forces were withdrawn.

"This is a position that still remains open and our hope is that as the Soviet government increasingly realizes -- and we hope that it does -- that its invasion of Afghanistan is damaging, then these proposals will be considered more seriously," Brzezinski said.

Carter's statement appeared aimed at encouraging the Soviets to turn the partial troop withdrawal they announced last week into the first step of a total withdrawal.

Moreover, his proposal was made before a Yugoslav audience which has a strong interest in both maintaining their country's independence from Moscow and in a relaxation of Soviet-American tensions.

Carter arrived here this morning after two days of staunchly anti-Soviet rhetoric at the Venice economic summit conference. He brought precisely the message the new Yugoslav leadership wanted to hear.

Just beginning to come to terms with the death of President Tito six weeks ago, Yugoslavia sees detente between the Soviet Union and the United States as important to its position as a nonaligned communist nation able to deal freely with both East and West.

The president, who was widely criticized for declining to attend Tito's funeral last month, showered praise on the late Yugoslav leader, calling him "a great man, one of the greatest of the 20th century."

But more important to the country's current leadership, the president reaffirmed the U.S. commitment to build on what he termed Tito's "precious legacy, a strong, independent and nonaligned Yugoslavia."

"In the past three years, the bonds between our two countries have grown visibly stronger, and I am eager to work with you to make them stronger still," Carter said as he arrived at the airport.

"The United States supports, and will continue to support, the independence, territorial integrity and the unity of yugoslavia. The United States wishes to see an economically prosperous and politically strong Yugoslavia. The United States respects Yugoslavia's nonalignment and admires Yugoslavia's constructive international role."

White House officials provided no details on the substance of Carter's talks with Yugoslavia's new collective leadership. The president told reporters the subjects ranged from the Venice summit conference results and Yugoslavia's position as a leader of the nonaligned nations to economic problems and the Middle East.

The awkwardness felt here in the first weeks of the post-Tito era was evident among Yugoslav officials.President Cvijetin Mijatovic appeared wooden and ill at ease as he greeted Carter at the airport, perhaps because he is president only for this year under the new system of rotating the presidency annually among various officials.

But the president's public reception was all that he could have hoped for. Thousands lined Belgrade streets to watch him pass, and while they were generally reserved, they seemed genuinely pleased to see Carter.

The president, in turn, seemed to enjoy the reception thoroughly. After a solemn wreath-laying at Tito's grave. and in between the official talks, he had lunch with his wife Rosalynn at an outdoor cafe where excited diners applauded him. He planted a tree in Belgrade's Friendship Park and briefly danced with a colorful troupe of folk dancers that had entertained him.

Carter will leave Wednesday for Madrid and another one-day visit to a European country. He is to return to Washington Thursday after a final stop in Lisbon.