Oscillating waves and optimal smoothing effect for one-dimensional nonlinear scalar conservation laws