Another Lesson From Uncle Tom
Such is akin to declaring that, if an author is white, they should only write white characters. And here I thought that was the problem!
To say that any culture beyond one's own should be off-limits to portray is just plain counterintuitive. Ignorance and prejudice are the enemies here, and the only way to counter them is to explore the world beyond one's original horizon. Literature has ever been a vital means of exploration. Uncle Tom's Cabin is an important example of this: it is a book written by a white woman from the perspective of a slave, and it is easily one of the most culturally influential books America has ever seen. It exposed white Americans to the true wicked brutality of slavery, and is named by some to even have been a factor leading up to the American Civil War.
That being said, Uncle Tom's Cabin and other books like it do not, of course, make up the full population of books written from outside perspectives. Prejudice and stereotypes in literature still run rampant. But umbrella-ideology is a dangerous thing, and one cannot justifiably judge a tool for the one who wields it. Since perspective is one of the most important tools to be found in a writer's arsenal, ideas like this one, that it is immoral to approach another culture at a deeper level, will only end up hurting literature, and our society by proxy, in the long run.
So, yes. Writers should most definitely be able to write characters of other races and nationalities. Let a work of art be judged for itself: if a writer portrays a culture crudely or in a disrespectful manner, condemn them for it. But do not, by any means, keep yourself or others from reaching out to research other perspectives and ways of life. Get to know the intricacies of marginalized mentalities. Get to know the many delicate ways of the world. Don't be afraid of getting it wrong, for as long as you come from a place of honest curiosity and a desire to grow from your mistakes, you will be fine.
Through conversation and literature both, let the mending begin.