Secretary of Defense William Cohen said on Sunday that the national elections here created "some room for optimism" for the future of Bosnia's shattered society. He warned, however, that Bosnian leaders had to make more progress or risk losing international support.

Cohen, the highest ranking U.S. official to visit Bosnia since elections here two weeks ago, said the United States was pleased by the lack of unrest during voting and by the victories of some moderate candidates, even though the Bosnian Serb leader endorsed by America, Biljana Plavsic, lost her bid for re-election.Nikola Poplasen, the leader of the Serb Radical Party who was a paramilitary official during Bosnia's three-and-a-half-year war, defeated Plavsic to become president of the Bosnian Serb Republic.

Poplasen's election is widely seen as a setback for Western efforts to reunite Bosnia. But the Clinton administration has found promise in gains made by moderates in the Bosnian Serb parliament and the half of Bosnia con-trolled by Croats and Muslims.

Since his victory, Poplasen, whose party calls for a reunification of Bosnian Serbs with Yugoslavia, has pledged to abide by the 1995 Dayton peace accords that ended the fighting in Bosnia.

"Let me say that the United States is prepared to work with all of the newly elected officials, as long as they support the Dayton accords and do so not only with their words, but by their deeds," Cohen said during a news conference at the U.S. Embassy on his first visit to Bosnia's capital as secretary of defense.