What loan-words keep their native pronunciation?
Solution 1:
I don't think there are hard-and-fast rules when it comes to words that have been recently assimilated into English. The pronunciation that usually sticks is a halfway house between the original foreign pronunciation and what is easy for Anglophones to actually say.
To take your two examples:
A word like tortilla can just be pronounced as if it were an English word, tortia, without any Spanish accent. But you will still find English speakers who pronounce the double l, just like the do with paella and Marbella, and also the j of fajita and jalapeno as [dʒ], since they are unaware of the Spanish pronunciation.
The sounds in the Japanese word karaoke are a bit more foreign. The r in there is a very different liquid to the English r, English speakers aren't used to gliding from [a] to [o], and English words seldom end with with an [e]. Hence the slightly mangled /ˌkæriːˈoʊkiː/
Solution 2:
Borrowed words tend to keep their pronunciation when there's a large subpopulation that uses the original language. For example, you will tend to find Spanish/Mexican words more often pronounced natively in states and cities that have relatively large Latino populations. OTOH a word like "karaoke" will be Americanized because very few Americans know the original pronunciation.
Solution 3:
There are many words that have stayed close to their original pronunciation: Wunderkind, schadenfreude, mademoiselle, sabot, ciao, pizza, etc.
As @Jim Balter mentions, foreign words are probably more likely to keep their foreign pronunciation when the foreign population is of sufficient size. I suspect that along with the shear size of the foreign population, the rate at which that population assimilates the native language has an effect too. A closed foreign community, of any size, is more likely to retain its original language longer than one that is open.
Refer also to the question " What words are commonly mispronounced by literate people who read them before they heard them? " to get a longer list of words where the accepted pronunciation does not necessarily match the accepted spelling.