Long-term optical spectroscopic variations in blazar 3C 454.3