Lawmakers could use the tax code in unprecedented fashion to extend friendly tax treatment to Taiwanese firms operating in the U.S. and American companies doing business in Taiwan, a reflection of the island’s unique position and backing in Washington.