* Dollar firm near 3-week high vs yen as Nikkei rises * Stock rally overshadows tension in Middle East