If the skinnier rim is stronger than the stock rim with tires of equal or better max load rating, it would be safe - however, that rarely if ever happens. The smaller wheel (and usually tire) has to be able to support the same amount of weight on a smaller area thus increasing the risk of rim and tire damage. It is generally considered to be unsafe; reputable wheel places won't sell you tires and/or wheels that are smaller or posess lower load ratings due to this fact.