Can I use a generic (non-Lego) transformer with a rechargable Power Functions battery?
Yes, you can use another transformer, even if it's not recommended by LEGO and you do so at your own risk (which should be minimal if you pay attention to what you do).

The plug polarity is + in the center and - on the outside; it should be mentioned on the battery and the real transformer (I wish I could find the one I have to check), and the size is a standard (but small) one. (Note that there is a protection in place should you reverse the polarity, but it won't work). Usually if you get a transformer with multiple plug adapters, it will be one of them. Note that is must be DC, this may seems obvious but since older LEGO transformers used AC it's better to make sure that point is understood. (and of course that's also why polarity is important).

The trick is to find one which outputs 10v DC, as 9v will not be enough to trigger the charge circuitry (the threshold is 9.5v). Apparently, you can charge it at 12v without too much trouble, but it will be slightly slower.

Edit: just go read RailBricks magazine issue 7 which has an extremely detailed article on the topic on pages 46 to 55 (yes, a full 10 pages).