Well, you could change it so that your webserver runs as root. That way you could do what you need.
But, don't!!
This is a huge security risk!!
The next best thing you can do is to store details of the work you want done in a file and have a cron job (with root privs) read that file every so often and actually do the jobs.
If that's not good enough, you could create a root service on your server listening at a particular port, and send it the details of the work to do. This would involve a fair amount of programming and you'd have to be certain it was watertight.
In either of these two solutions, you would need to have the program that does the work, check the jobs beforehand to make sure that they're not dodgy. You don't want a hacker laying an egg in there!!
Hint: Go with the second option!
Cheers,
Jack