Is it possible to design a probability function P(x) such that the distribution will have a specified kurtosis, K, and skewness, S?
Certainly.
Consider, for example, the Pearson system of distributions.
This is a system of distributions (a collection of distribution families) indexed by the standardized third and fourth central moments (which is usually what people mean when they say 'skewness' and 'kurtosis'), or more usually, the square of the standardized third moment and the standardized fourth moment.
These families - twelve in all, if I remember correctly (but 4 main ones, the remaining ones are special cases) - divide up the skewness-kurtosis plane into regions where each family applies.
To my recollection these families include the normal, t, gamma, inverse gamma, F, and beta distribution families.
There's a fairly detailed discussion of the Pearson type IV distribution family, including the relationship between its parameters and the mean, variance, skewness and kurtosis.
Heinrich, J. (2004)
A Guide to the Pearson Type IV Distribution,
Univ. Pennsylvania, Philadelphia, Tech. Rep.
CDF/Memo/Statistics/Public/6820
[Incidentally, the R package PearsonDS (available on CRAN) offers the usual set of functions for pdf, cdf, quantiles and random numbers, as well as fitting (via maximum likelihood or method of moments). There's a function, pearsonFitM to fit a given mean, variance, skewness and kurtosis.]
--
But you can do just fine, simply by taking a few discrete points, say 5-6, and holding the mean constant (at 0), move points around until the desired values are obtained. Such an approach can be automatic via use of optimization routines, though in specific cases it doesn't take long by trial and error (as long as you don't try to realize unattainable values!).
For example, let's say I want standardized 3rd central moment to be 1 and standardized 4th central moment 5.
Consider these 6 values, arrived at by trial and error:
-2.9935,-1.51988,0,0,.51988,3.9935
they give (for the standardized 3rd and 4th central moments):
1.000026
4.999994
which are accurate to 5 significant figures.
Edit: see also this related question