Is it okay to purposely stall a small single-engine aircraft just before touch down to get a good flare?
"To get a good flare".  Never heard of pilots talking about "wow, I had a great flare on that landing!", although a very famous test pilot really had a beauty landing the XF-92A, reducing landing speed from around 160 to 67 mph.

So why do we flare?  What is a flare?  

"Flaring"  is increasing AOA to MAINTAIN lift as the plane slows down.

Why do we slow down as much as possible before landing?

Too fast and the plane will "bounce". Bouncing is not a major problem if it is on the main gear (and not too hard).  Bouncing the nose gear can be disasterous.  Since you have a lower AOA for the same lift when faster, risk of bouncing the nose gear is greater.  For taildragger, the risk is prop strike.

So you flare to increase AOA after rounding out and prior to touchdown, reducing speed and increasing AOA.

Do you need to stall to get a good flare?  NO!

Does the stall warning mean I'm stalled?  Try it at altitude first.  Generally they are set a few knots ABOVE stall, and it is normal to hear it as you touch down.  Know your plane.

Finally, "round out" at approach speed (you don't want to stall here), then reduce throttle and pitch up (flare).  The trick is to hold it a few feet off the runway as speed decreases and AOA increases.  You are now flaring!

Actually landing, well, everyone has their own ideas.  In a 172, I could just start to feel the seat of my pants drop.  At that point, back pressure on the yolk was relaxed just a tiny bit (slightly reducing AOA and lift), and the plane would settle onto the runway.

Flaring as all about speed control.  Keep it safe.