Tourist to Japan can buy a bike
Non resident of Japan ( even if you are tourist ) can purchase a scooter in Japan and drive it. ( international driving license is necessary )
When you have purchased a scooter, you need to register it with city hall.
Generally when you register it with city hall, you need to clarify your legal address in Japan.
But, even if you do not have legal address in Japan, if you have real estate in Japan and paying utility fee in Japan, you can register it with address of your real estate.
You can prepare documents that can certify your ownership of real estate, receipt of utility fee etc.
And you need to pay scooter tax in Japan.
So, you need to appoint tax agent in Japan.