Role of the tensor force in light nuclei with the tensor-optimized shell model