I'm looking for a lens for portraits and closeups (leaves, branches, icicles) that would be fast enough to get a blurred background.
My camera is a Nikon D50 and I'd like to get something for maximum $200.
If you're okay with manual focus, keep the 135mm f/2.8 AIS in mind. It's a little longer than the other suggestions, but:
it's a very nice lens that focuses relatively close;
the f/2.8 is wide enough to keep the DoF thin if the subject is close enough;
the 135, though longer than the usual suspects, is not far off the 180-200mm range I found really flattering for head shots in full frame; and
the used market is lousy with them (most casual shooters who bought one ended up using a 70-210 or 80-200 zoom instead) and you should be able to pick one up well within your budget.
If you can find one that's optically good but shows a little brassing, you may even be able to throw it in your bag alongside a brand-new 50mm f/1.8 and still stay (barely) under budget. Some people seem to think that manual focus lenses have no value in the autofocus DSLR world, you see, so you may be able to pick it up at a "useless old knick-knack" price.
I can second the comments about the Nifty Fifty (or Thrifty Fifty). I use mine for band photos and it is wonderful, light, fast, and sharp. It's an amazing investment for very little cash.
However, I'd argue that you can still get a nicely blurred background at maximum aperture on the D50's most common kit lens, the 18-55, if you're outdoors and taking photos of icicles etc.
Sigma 24mm 2.8 is a great lens that can be picked up for around $120 on the used market.
The benefit of this over the 50 others are suggesting is the minimum focus distance. The Nikon 50mm 1.8 has a minimum focus distance 45cm (1.5 ft) The minimum focus distance of the 24mm 2.8 is 18cm (7 inches). The Sigma was originally called Quantary and might be able to find a copy looking for it that way as well.
Nikon also makes their own 24mm in a 2.8 thats new about $400, used $200-$250. If you go with an older AI/AIS you can find it under $100 its just manual.
Another option you should strongly consider is the Micro-Nikkor 40mm f/2.8. New its around $280 but I'm sure you can find a deal or used model under the $200. Its got a minimum focus distance of 6".
Since you mention wanting to shoot closeups of leaves and branches and stuff like that the minimum focus distance is something really important. Even the Nikkor 35mm 1.8 which is only $197 would be a better option in my opinion than the 50mm because it's got 15cm (0.5 ft) less focus distance.
Also keep in mind these lenses last a long time. I've had my 24mm 2.8 macro for about 15 years now and other than the numbers starting to be hard to read it works as well as the day I got it.