Thomas Caceci of Woodley Park thought he was killing two birds with one stone. Rummaging through his basement not long ago, he found three cardboard boxes full of old books he no longer wanted. But rather than sell them, or try to, Caceci decided to donate them to the D.C. public library.

Civic pride thumping in his breast, Caceci marched into the Cleveland Park branch library. But the clerk didn't leap gratefully out of her chair to embrace him. In fact, as Caceci watched in astonishment, she rejected book after book after book. Out of Caceci's dozens, she ended up accepting only 12, and only four of those were hardbound.

"I thought there was a budget crisis," Caceci lamented. "I was giving them books. How could they do this?"

Because when it comes to old books, beggars must be choosers, says D.C. public library director Hardy Franklin.

"All the branch does in a situation like this is to pick out what it can use. Anything that can't be used is forwarded to the Martin Luther King library downtown for use by other branches," Franklin said.

"But sometimes there's a duplication of titles. Sometimes the material the person is trying to donate is dated. Some of it is just stuff we don't want. And sometimes the stuff is falling apart."

But why can't the public library accept damaged books and find some agency that will take them?

"Because we're not in the shipping business," Franklin said."It costs money to truck books around. We don't have any to spare."

Nor does the public library want to get jimmied into accepting worthless or near-worthless books so the donor will get a tax break. That's enough of a problem now for books the library does accept.

"We're always getting donors who ask us to set a value on books they donate," said Franklin. But all the library will do for any book it accepts is to give the donor a form reporting that he gave it. It's up to him to declare a value.

Doesn't anybody accept books in doubtful condition?

The answer is yes. Five outfits stand ready to take your basement out of its misery. They are:

Goodwill Industries (347-5878).

The Salvation Army (842-5050).

The Vassar Book Sale (donations accepted as long as you bring them to 2737 Devonshire Pl. NW. any Monday, Tuesday, Wednesday or Thursday except holidays between 9:30 a.m. and 12:30 p.m.).

The State Department Wives (call Naomi Brown at 549-1428).

Or the Brandeis Book Sale (call Fredi Fries at 881-9149).

All five groups draw the line at books without covers, and textbooks so old that their contents have been discredited or surpassed. But generally, according to their spokes-people, these groups tend to say yes.