I do not know the technicalities of IDPA of what is allowed or not, did a quick search but drew blanks. Anyways, if you are set on one gun that has optics capability, perhaps look at the Canik line (if you don't get a Shadow). Great reviews all over the web, nice triggers, and many come with mags, holster, and a variety of accessories. The TP9 SFX even has a model that comes with a Vortex Viper - one and done; learn and upgrade down the road. I would stop kidding yourself that you will not be buying more pistols later anyways - one always leads to two, which leads to.....
https://www.wolverinesupplies.com/SearchByKeyword?word=Canik#?sortValue=0