Compensation awarded to witnesses shall be paid by the Treasury only insofar as they have been summoned or called, either at the request of the public prosecutor or pursuant to an order made ex officio in the cases provided for in articles 283 and 310.