Efficient and Near-Optimal Smoothed Online Learning for Generalized Linear Functions