RE: What barrel length?
Since you're going to scope the rifle, I think any of them would do the job. I do not have an Optima but have read a lot of good reviews about them. A good scope would be a must for someone wanting to shoot that kind of distance. Once you find the right projectile then it will be a matter of practice.
A longer barrel is an advantage if your burning lots of powder, but I commend you on the fact your aware that 100 grains is a better level of load range then 150 grain. My Black Diamond XR has a 26 inch barrel and I would shoot that far. My Wolverine has a 22 inch barrel and if it were scoped I would still shoot that far.