As others have mentioned, Oxygen doesn't HAVE to have eight electrons, it just wants to. This applies to pretty much any other element you'll run across in gen chem or orgo, the main exception being Hydrogen (which has one and wants to have two). Oxygen is six elements from the left of the periodic table, so it has six valence electrons. In general, when you see oxygen in an uncharged lewis structure with eight electrons, remember that oxygen "owns" only six of those. The other two come from covalent bonds. For example, in water, the hydrogens supply one additional electrons each, for a total of eight elecrons. In an alcohol, carbon and hydrogen each supply an additional electron, again for a total of eight.
Hopefully this helps.