Approximated optimal control of singularly perturbed systems via Haar wavelets