You can, but I’d recommend reducing the quantity slightly as white/red onions are stronger and less sweet than shallots. I would recommend 2 onions if you’re subbing out the shallots. If you can though, try and stick with the shallots as it’s their sweetness that really makes this dish a 10/10.