Leveraging Randomized Smoothing for Optimal Control of Nonsmooth Dynamical Systems