No, they can't "self-fertilize." They can, however, wear either hat (and apparently store sperm for an extended period of time). They "get prego" when they molt - so if you have two (or more) shrimp, whenever one molts, it will most likely end up with eggs....
FWIW,
Kevin