A corruption of ouph (elf). A foolish child or dolt is so called from the notion that all idiots are changelings, left by the fairies in the place of the stolen ones.
This guiltless oaf his vacancy of sense Supplied, and amply too, by innocence.
Source: Dictionary of Phrase and Fable, E. Cobham Brewer, 1894
More on Oaf from Infoplease: