GRB 140102A: insight into prompt spectral evolution and early optical afterglow emission