The production of 26Al in the early solar system by oxygen rich cosmic rays