Fill a medium-sized saucepan with 4 cups of water. Add torn kaffir lime leaves, roughly chopped lemongrass, galangal, whole garlic cloves, and sliced chilies. Cover, and bring to a boil over medium-high heat.
Let the water boil for about 5 minutes; add tom yum paste and coconut milk (if using). Bring heat to medium-low Simmer for another 5 minutes.
Add the shrimp, oyster mushrooms, onion, tomatoes, fish sauce, and sugar. Cover, and let simmer for 10 minutes.
During the last five minutes of simmering, add the cilantro or flat-leaf parsley, and the lime juice.