Two American hostages alleged by their Iranian captors to be CIA agents or spies have been allowed to send letters to the United States, according to an American citizen who recently returned from Tehran bearing what he said were 151 letters written by 40 of the hostages to relatives or newspapers in the United States.

John Thomas, an official of an Indian umbrella group called the International Indian Treaty Council who said he had gone to Iran to attend a World Liberation Day conference, told reporters at a news conference that he met with Iranian militants holding the embassy and had been allowed to speak to one hostage, Joseph Subic, last Sunday.

He said Subic gave him the 151 letters.

A list of the 40 hostages who Thomas said sent the letters included the names of Thomas L. Ahern Jr., who was denounced by Iranian militants Dec. 6 as a spy, and William Daugherty, who the militants charge was named as a CIA agent in a top-secret cable found in embassy files.

The letters from Ahern, Daugherty and two other hostages on Thomas' list also are a step toward clearing up the mystery of seven hostages who appeared to be missing when three American clergymen held Christmas services at the embassy in Tehran.

The State Department had said there were 50 American captives, but the clergymen reported seeing 43. Among the seven unaccounted for were Ahern, Daugherty, W. E. Belk and Robert Blucker. According to Thomas, Blek and Blucker also sent letters to the United States through him. Thus, it appears that at least four of the missing seven have sent letters and may be presumed to be present at the embassy.

A State Department spokesman said the fact that Ahern and Daugherty were allowed to send letters is significant because it indicates that they are alive and well, despite the spy accusations by their captors.

Malcolm Kalp, another CIA agent and who also was among the seven that the clergemen didn't see, was not listed as having sent a letter back with Thomas.

Thomas' news conference yesterday came immediately after he met with relatives of some of the hostages from this area and delivered letters to them.

One, Mrs. Louisa Kennedy, said Thomas gave her two letters from her husband, Moorhead Kennedy, who was economic and commercial officer at the embassy. One, dated Jan. 11, read in part that "some [hostages] have received no letters at all" from their relatives, and that only a couple addressed to him got through. His letter said he had been allowed to take outdoor exercise, to wash his sheets for the first time and to shave. It added that he had plenty to eat, was getting vitamin supplements and "all the books I need."

One letter, addressed to the Salt Lake Tribune and typed flawlessly on U.S. Embassy stationery, was shown to The Washington Post by a representative of the Tribune.

Dated Jan. 9, it was signed by hostages Subic, Kevin Hermening and Steven Lauterbach. It said they were receiving three American meals a day, two showers a week and clean clothes, and slept in heated rooms with mattresses.