Larger atoms with complex electron orbitals, such as those found in the transition metals, are able to exceed the octet rule under the right conditions. In particular, these occur when the heavier elements are bonded to small, highly electronegative elements like fluorine, chlorine or oxygen. One example is phosphorus pentachloride, a single phosphorus atom bound to five chlorine atoms, which has 10 shared electrons in its outer valence shell.
When an element has a high enough atomic number, a new type of electron orbital is available with the capacity for up to 10 electrons, allowing up to five single bonds. This is what occurs with phosphorus pentachloride. To make use of that orbital, however, the reaction creating the compound that uses this orbital must be very energetically favorable. This is why, in order to make it work, elements with a very strong ability to attract and bind electrons, also known as electronegativity, must be involved. Oxygen has a high electronegativity, but it is unlikely to create a compound with five bound atoms like chlorine does, because it requires two electrons to complete its outer valence shell. Fluorine and chlorine each require only one, and so make this sort of configuration more likely.