The short answer to your question is yes. There is such a space, that of the locally smooth functions on $K$.
Let us recall that Schwartz defined the space of distributions with support in $K$ not directly by duality but by first defining the space of distributions on the line, then the notion of restriction of a distribution to an open set and finally the support of a distribution as the complement of the union of the open sets on which it vanishes. In parallel he defined the space of distributions of compact support as the dual of the Frechet space $C^\infty$ of smooth functions there. It is then a theorem that the two concepts coincide.
The answer to your question is rather more subtle. This can be seen in the simplest case, i.e., where $K$ is the origin in the real line. The space of distributions with support there is infinite dimensional--it consists of the linear combinations of the Dirac distribution and its derivatives. This can obviously not be the dual of a space of functions defined on a single point. It is, however, the dual of the space of germs of smooth functions at the origin, which is defined as the inductive of the spaces $C^\infty(]-\epsilon,\epsilon[)$ over positive $\epsilon$. As the parameter decreases to zero, these form an inductive system of Frechet spaces and its union can be given a lcs structure in the standard way as an inductive limit, i.e., provided with the finest such structure for which the corresponding injections are continuous. The dual of this space is then the space of distributions with support at the origin.
This can be extended to the general situation in the natural way. For a given compactum $K$ one considers the family {$C^\infty(U)$} of Frechet spaces indexed by the open neighbourhoods of $K$. This forms an inductive system and its inductive limit as above is by definition the space of functions which are locally smooth on $K$. Once again, its dual is the space of distributions with support in $K$. We remark that it is an abuse of notation to call these functions. They are in fact germs of functions, a concept familiar from differential topology.
In order to avoid misunderstandings, I recall the definition: if $C$ is a closed set in a topological space, a germ of a function on $C$ is a pair $(f,U)$ where $U$ is an open neighbourhood of $C$ and $f$ is a function defined on $U$. Two such germs $(f,U)$ and $(f_1,U_1)$ are identified if there is an open neighbourhood $U_2$ of $C$ contained in $U\cap U_1$ on which they agree. In our case, we have a compact set in a manifold and we consider only infinitely smooth functions. This is a concrete representation of the set theoretical inductive limit of the above system and so has a natural lc structure by taking the limit in the sense of locally convex spaces. This is the formal definition of the space of functions on $K$ (more precisely, germs of functions on $K$) whose dual is the space of distributions with support in $K$.
As a final remark, this approach works smoothly in the context of complex analytic functions where it leads to the concept of the space of functions which are locally analytic on a closed subset of the complex plane. This was used by Köthe in his work on duality in spaces of holomorphic functions from the 50´s, extending work of J. Sebastiao e Silva for the disc.