Turkey capitalised on poor finishing from the Republic of Ireland as they grabbed a 2-1 win in Dublin.