ScotRail is scaling back opening hours at Stranraer as it claims more people are buying tickets online or at machines.