Electronic and Structural Properties of Oxygen-Doped BN Nanotubes