Let K[HK Θ ] denote the Hecke-Kiselman algebra of a finite oriented graph Θ over an algebraically closed field K. All irreducible representations, and the corresponding maximal ideals of K[HK Θ ], are characterized in case this algebra satisfies a polynomial identity. The latter condition corresponds to a simple condition that can be expressed in terms of the graph Θ. The result shows a surprising similarity to the classical results on representations of finite semigroups; namely every representation either comes form an idempotent in the Hecke-Kiselman monoid HK Θ (and hence it is 1-dimensional), or it comes from certain semigroup of matrix type (which is an order in a completely 0-simple semigroup over an infinite cyclic group). The case when Θ is an oriented cycle plays a crucial role; the prime spectrum of K[HK Θ ] is completely characterized in this case.