I got an iPhone in Germany, but I'm in Japan now. The camera has got some issues, and I wonder if I can go to a Japanese apple store with my problem or do I have to wait until I'm visiting Europe/Germany the next time?
Absolutely go to an Apple retail store if one is convenient. Worst case, they can assist you in setting up service in the country of origin if that is needed, but in many cases, parts are universal should you need an actual hardware repair.
Both countries you mention also have web service, so you can set up service and possibly a repair without needing a trip to the store.
Technically, Apple could ask you to mail the product back to the country where you bought it, but my experience is that is reserved for rare circumstances and not the normal procedure.
I believe the iPhone warranty is limited to the country of purchase.
I was able to find this:
IMPORTANT RESTRICTION FOR iPHONE AND iPAD SERVICE.
Apple may restrict warranty service for iPhone and iPad to the country where Apple or its Authorized Distributors originally sold the Apple Product.
Also, once when I was at an Apple service center in India, I saw a big board they had put up which said "iPhone support is provided only to locally purchased devices."
But I guess there is no harm in trying. These things are not always set in stone.