You can't allow certain cookies to stay and others to be deleted. Firefox either deletes them all or saves them all.
What you can control is which sites are allowed to put cookies on your computer in the first place.
You do this in Firefox from the "Options" in the Tools menu.
Click on "Privacy" and then "Cookies".
Select "Allow sites to set cookies"
Select "for the originating site only"
Select "unless I have removed cookies set by the site"
Select "Keep cookies until they expire"
Then click "View Cookies" and delete all the cookies from sites you don't recognize. Don't delete the cookies from yahoo.com or any other sites you want to use. Once you remove the site, it won't be allowed to set cookies in the future.
If you're worried about particular sites (citibank, paypal, etc.) you can try disabling cookies for that site, but they may not work without cookies. If that's the case, use the "Exceptions" button on that options page and add that site back as "allowed".
Remember, with Firefox 1.5 You can always clear your personal data at any time by "Clear Private Data" under the Tools menu.