Yes it's okay to only get 2 new tires at a time especially if for example your back or front tires are more worn down than the others.
There have been times when I haven't had the money and had to just replace 2 tires at one time each month until I had the money the next month to get another 2 tires.
I had to replace the front tires on my truck before and only was able to buy 2 tires at one time.
Then the next month I got the other 2 tires.
Some tire shops may not want to replace only 2 tires but some will so check around.
Or if possible remove your tires from the vehicle and take the tires and rims in and they will replace them that way as well.
It's best to replace all 4 tires at once especially if all 4 tires are old and worn but sometimes you gotta replace only a few tires at a time.