Ultrafast optical response in polydiacetylenes and polythiophenes