IN ONE IF NOT TWO southern African trouble spots, Rhodesia and Namibia, prospects for a peaceable solution have perceptibly brightened. In Rhodesia, the multiracial interim government led by Ian Smith is now prepared to attend American-and British-sponsored talks, if they are "well-prepared" and "without preconditions," with its guerrilla rivals. In Namibia, South Africa is ready to resume talks on taking the territory to independence by United Nations-sponsored elections in which SWAPO guerrillas would compete, rather than simply running its own elections, excluding SWAPO - a course that would produce what the world would regard as a puppet regime.

The Rhodesia development followed directly from Ian Smith's visit to the United States. Critics of that visit, including some in the administration, had feared the Smith group would appeal successfully for recognition over the administration's head. In fact, Mr. Smith and his black partners were apparently persuaded by the restrained response their appeal drew here that their only hope lay in negotiation with the guerrillas. Their big raids last week on camps in Zambia and Mozambique apparently comprised the gesture Mr. Smith felt he needed to retaliate for recent guerrilla attacks and to convince his constituency he was not entering talks from weakness.

American and British diplomats helped by diluting their Rhodesia plan, parts of which Salisbury gagged on. The plan is now more like an agenda. There remains the formidable problem of assuring attendance by the guerrillas, who feel enraged and humiliated by the recent raids. It will fall first to their patrons among the "frontline" states to "deliver" them. If they can, a conference can begin. Progress will be arduous; failure will mean disaster.

Regarding Namibia, the Western diplomats who visited Pretoria last week did not obtain a clear answer on how to fit the narrow "internal" elections that South Africa still plans to run in December with broad U.N.-Sponsored elections next year. But the possibility that diplomacy can fit them later is now there. The important thing is that South Africa drew back from the twin propect that holding internal elections alone would spur the guerrilla war in Namibia (perhaps bringing in the Cubans) and produce a U.N. demand for economic sanctions against South Africa. The United States and its allies, though not eager for either of those developments, told Prime Minister P.W. Botha they could not block them if he disdained the U.N. plan. They put their relations with South Africa in the balance. Mr. Vance played a very high card - the prospect of an unprecedented invitation to Mr. Botha to visit Jimmy Carter if the U.N. plan works out.

What could spoil the new promise would be for Africans to insist anyway on voting sanctions against Pretoria. It is not simply that such a demand would embarrass the West, which seeks closer ties in black Africa even while maintaining substantial economic interests in South Africa. The demand would curdle Pretoria's taste for the very changes black Africa seeks in Namibia. Mr. Botha has now said, after all, that South Africa would accept a SWAPO victory in U.N.-run elections.

Everyone is aware that South Africa's policy is now being made by a new prime minister, Mr. Botha. Suspicions were widespread after his recent elevation that he would feel under pressure to show toughness. Yet his response in Namibia has shown a welcome hint of flexibility. South Africa's hand in Rhodesia does not show directly, but one can guess that the new direction taken by Ian Smith owes a good deal to Mr. Botha. The potential significance of this is hard to exaggerate. Throughout southern Afrcia, as within South Africa itself, the choice between violence and conciliation is substantially Pretoria's to make.