Optimal Regularized Online Allocation by Adaptive Re-Solving