Structures in 9,10Be and 10B studied with the tensor-optimized shell model