Russian President Vladimir Putin has accepted President Recep Tayyip Erdoğan's invitation to visit Turkey amid tensions with Ukraine.