Band structure and optical anisotropy in V-shaped and T-shaped semiconductor quantum wires