Symmetry effect on the optical properties of armchair and zigzag nanotubes