Radiation of a charged particle accelerated along a finite path segment