Is it safe to smoke up to 5 cigarettes a day when suffering from asthma?

No. Never safe to smoke at any time, but much worse with asthma. You are looking at permanant lung damage.
No. It's never safe to smoke with any respiratory disorders.