Can I prevent myself from getting an STD after I've slept with someone with a known std?

No. Once infection has occurred (i.e. Once sex has occurred), you cannot uninfect yourself. Protect yourself before and during sex, not after. It's not as if you can wash them away. Talk with your doctor about better strategies for std prevention such as condoms!
Can't prevent. After the fact...Hopefully you come out unscathed and use better judgement next time.