if you are in US, it would probably be interesting to get a cheap k100d, second hand, and ir-convert it. you could do the same with the d40, but it might be more expensive on the long run (separate lenses).
coming back to your question, to sum what has been said really: yes, fully compatible, in short, it will only be slower (so maybe a good advice is to get the kit lens with the body you buy, jsut the same, for two reasons: it is actually a good lens, it is cheap when you buy it with a body, it provides wideangle, which is hard to find in the old lineup (28mm is not wide on the aps-c sensors), and it has af. auto-exposure auto everything, for the times you are in a hury -- two very good reasons as you can see
)
ps: the d50 was my first dslr. very nice camera, however the compatibility issues and the ugly nikon attitude towards that ("buy a d200 or shut the **** up" and "because we feel like it, not because we can't do it") made me sell it and buy the k100d. i never looked back. imho, if you are so keen on old glass, you can make the switch without blinking (the worse that can happen is be pissed about the metering issues with smc-m on the k20d, which can be solved quick and cheap buy getting a more suitable focusing screen for that purpose -- speaking of, many people recommend getting a split screen, like a katz eye, for the full "retro experience"
).