your flash can be triggered wirelessly by your on camera flash. So by all means do so. This will eliminate the harsh shadows that occur from using the flash on camera. Hand hold the flash if need be.
You'll have to set up the K10D to work in wireless mode. What this will do is use your built in flash to trigger the af-540fgz, without having it (on camera flash) add to the exposure.
Then some general flash tips. I would shoot in manual mode. When using a flash, the most important thing to consider is your aperture. the flash fires fast. faster than your shutter speed. So your shutter speed has little bearing on your subject's exposure (what's being lit by the flash). So once you determine a good flash exposure then start looking at your shutter speed.
In flash photography, your shutter speed has most effect on exposing your ambient light. So say your exposing your subject with your flash at full power with your aperture at f/5.6.....using the max sync speed of 1/180 will underexpose the ambient light and leave you with an underexposed background. Your subject will be exposed properly, but you background will be black.........for an example see about 99% of P&S flash shots.
So slow the shutter speed down to bring up the ambient light. This is known as dragging the shutter.
I think the best overall advice would be to take as many pictures and experiment using the flash between now and the wedding.
Also, I tend to type faster than I think! So if anything I wrote needs clarification, I'll do my best to do so! Good Luck!
One more thing! Codiac has written an excellent entry on his
blog about bar and night club photography with some really good flash techniques. Make sure to check it out too!