There are two ways to do that. First one is that you create a multisig transaction, and send it to an oracle/oracles, along with a request for them to sign the transaction when they discover that an event occured.
After the time comes, the oracle(s) sign the transaction and release it to you.
This is the way Orisi works
Another way is to send to the oracle(s) a request to look for an event. Then they give you a public key, and you use that public key to lock the transaction. When the time comes, the oracles publish a private key to that public one, and you use it to unlock the transaction. This is the way RealityKeys work. (although their code is closed source)
The second option is relatively easy to implement, although I'm not sure if there are any open source implementations available at this time.
The first option (signing happening on the oracle's side) is a bit more complicated, but on the other hand it allows for greater granularity of contracts. E.g. you may ask oracles to send 2030-(year-of-event) BTC once the event happens, and return the rest to the sender. The oracles may also manage the funds for the time being - e.g. you can tell them to send funds to a new multisig address if one of the oracles dies / loses it's keys. And there's a code ready to handle all that on Orisi's github repo.
For more info you might want to check out Orisi / Distributed Oracles whitepaper which deals with example implementation, and Bitcoin Wiki entry on Contracts