How can I programmatically use several different (isolated) wallets?
Currently bitcoind is designed to only run one wallet at a time.  You would have to run multiple daemons on different ports and connect to each separately.

That said, it looks like multiple wallet support is being actively developed and will be available possibly in 0.9, based on this pull request.