X-ray source based on parametric and transition radiation of electrons