Here's a non random algorithm to solve this. First, we clear the color of all the edges. Then, at each step, for each edge, suppose we color the edge white (similarly black). Then, compute the expected number of monochromatic copies of $K_4$ in the resulting graph. Pick an edge and color that minimize this expectation, and color the edge with that color. This is clearly polynomial in $n$ (maybe $O(n^6)$).
...now that we have a non randomized algorithm, we can always make it a randomized algorithm by, for eexample, instead of trying every edge and find the one that minimize the expectation, we can instead try random edges until we find one that makes the expectation still not greater than $\binom n4 2^{-5}$. This is still polynomial in average, but is this cheating?