NEW DELHI, India (AP) _ Afghanistan's communist leader Najib will hold elections if his national reconciliation program succeeds and he remains willing to negotiate with Moslem guerrillas, the Afghan ambassador said today.

Ambassador Abdul Samad Azhar, who presented his credentials last month, also acknowledged divisions in the ruling communist party and said a number of of party leaders are in jail for committing ''crimes against the people.''

Earlier this month, the Kabul government called a unilateral six-month cease-fire and offered national reconciliation, including peace talks and limited amnesty for rebels, to end the nearly 9-year-old Moslem insurgency.

The rebels rejected the offer, saying it was a ploy to legitimize Soviet control of their country. They said they will not accept a cease-fire until the estimated 115,000 Soviet troops leave and the communist government is toppled.

The Kabul government since has acknowleged the cease-fire is not working.

''The doors of negotiation are open. We are prepared to talk to anyone who responds to our call for national reconciliation,'' Azhar told a news conference at the Afghan Embassy, the first since the communists took power in an April 1978 coup.

Azhar also said the government was willing to hold elections if the program of national reconciliation succeeds.

''If the people reject us, we will give up. But we are sure that the people of Afghanistan ... will support our party,'' he said.

''We hope that our peace initiative will have a postive impact on the impending talks in Geneva,'' Azhar said. ''It is now time for Pakistan and (the) U.S.A. to reciprocate our peace initiatives.''

Pakistan and Afghanistan are conducting indirect peace talks sponsored by the United Nations. About 3 million Afghans have fled to Pakistan since the fighting began and Afghan guerrilla groups have camps along Pakistan's borders. The main sticking point is a timetable for the withdrawal of Soviet troops. Pakistan wants a four-month withdrawal, while Kabul has proposed a four-year pullout.

The guerrillas want a swift withdrawal because a settlement would cut off aid from its backers, including Pakistan and the United States.

Azhar said Kabul is optimistic a settlement will be reached in the next round of talks, scheduled to begin Feb. 11.

The ambassador said Afghan officials are preparing a list of political prisoners to facilitate their release in the event of a settlement. He said there are thousands of political prisoners in Afghanistan.

In response to a question, Azhar said a number of leaders of the governing People's Democratic Party of Afghanistan are in prisons for having committed ''crimes against the people,'' but did not name the jailed leaders.

He said no party leader has been imprisoned since Najib replaced Babrak Karmal in May. Najib, who only has one name, was head of the secret police force before becoming party leader.

Azhar acknowledged there are sharp differences between two rival factions of the party and that not all groups support Najib.

''But which party in the world has no differences?'' he asked.

The party was formed before the coup by the merger of the Khalq and Parcham factions, but its members remain at loggerheads.

Azhar is a former police deputy inspector general. Afhgan rebels accused him of torturing to death former Premier Mohammed Hashim Maiwandwal after the coup. Maiwandwal held office 1969-70 under King Zahir Shah, who was ousted in the coup.

Rebels also accused him of committing atrocities against civilians in the southeastern Kandahar district, where he was security chief in the early 1980s.

Azhar, a close lieutenant of Najib, served as ambassador to Cuba before coming to New Delhi.