Can I start taking allopurinol during attack?

Not ideal. If you need to start allopurinol, the ideal time is after a gout flare has fully resolved. For me, the golden rule of Allopurinol is not to change the dose during a flare - don't start, stop, or change at all unless by doctor's recommendation.
No. Allopurinol should not be started during an acute attack of gout. Colchicine (colcrys), anti-inflammatory medications, or steroids can help reduce the inflammation of an acute attack. After that, it is best to be on prophylactic Colchicine for several weeks before starting Allopurinol which is to lessen/prevent further gout attacks.